Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
python-poetry
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open
python-poetry
Commits
2de58ebe
Commit
2de58ebe
authored
Mar 22, 2021
by
Arun Babu Neelicattu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands/show: fix rendering of single package
parent
129ed0e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
1 deletions
+41
-1
poetry/console/commands/show.py
+1
-1
tests/console/commands/test_show.py
+40
-0
No files found.
poetry/console/commands/show.py
View file @
2de58ebe
...
...
@@ -124,7 +124,7 @@ lists all packages available."""
]
table
.
add_rows
(
rows
)
table
.
render
(
self
.
io
)
table
.
render
()
if
pkg
.
requires
:
self
.
line
(
""
)
...
...
tests/console/commands/test_show.py
View file @
2de58ebe
...
...
@@ -84,6 +84,46 @@ pytest 3.7.3 Pytest package
assert
expected
==
tester
.
io
.
fetch_output
()
def
test_show_basic_with_installed_packages_single
(
tester
,
poetry
,
installed
):
poetry
.
package
.
add_dependency
(
Factory
.
create_dependency
(
"cachy"
,
"^0.1.0"
))
cachy_010
=
get_package
(
"cachy"
,
"0.1.0"
)
cachy_010
.
description
=
"Cachy package"
installed
.
add_package
(
cachy_010
)
poetry
.
locker
.
mock_lock_data
(
{
"package"
:
[
{
"name"
:
"cachy"
,
"version"
:
"0.1.0"
,
"description"
:
"Cachy package"
,
"category"
:
"main"
,
"optional"
:
False
,
"platform"
:
"*"
,
"python-versions"
:
"*"
,
"checksum"
:
[],
},
],
"metadata"
:
{
"python-versions"
:
"*"
,
"platform"
:
"*"
,
"content-hash"
:
"123456789"
,
"hashes"
:
{
"cachy"
:
[]},
},
}
)
tester
.
execute
(
"cachy"
)
assert
[
"name : cachy"
,
"version : 0.1.0"
,
"description : Cachy package"
,
]
==
[
line
.
strip
()
for
line
in
tester
.
io
.
fetch_output
()
.
splitlines
()]
def
test_show_basic_with_not_installed_packages_non_decorated
(
tester
,
poetry
,
installed
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment