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
8321a8ff
Unverified
Commit
8321a8ff
authored
Nov 19, 2019
by
Sébastien Eustace
Committed by
GitHub
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix an error in show when using the -o option (#1607)
parent
e0156477
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
3 deletions
+47
-3
poetry/console/commands/show.py
+7
-3
tests/console/commands/test_show.py
+40
-0
No files found.
poetry/console/commands/show.py
View file @
8321a8ff
...
...
@@ -172,6 +172,13 @@ lists all packages available."""
# Non installed in non decorated mode
install_marker
=
" (!)"
if
(
show_latest
and
self
.
option
(
"outdated"
)
and
latest_statuses
[
locked
.
pretty_name
]
==
"up-to-date"
):
continue
line
=
"<fg={}>{:{}}{}</>"
.
format
(
color
,
name
,
name_length
-
len
(
install_marker
),
install_marker
)
...
...
@@ -183,9 +190,6 @@ lists all packages available."""
latest
=
latest_packages
[
locked
.
pretty_name
]
update_status
=
latest_statuses
[
locked
.
pretty_name
]
if
self
.
option
(
"outdated"
)
and
update_status
==
"up-to-date"
:
continue
if
write_latest
:
color
=
"green"
if
update_status
==
"semver-safe-update"
:
...
...
tests/console/commands/test_show.py
View file @
8321a8ff
...
...
@@ -379,6 +379,46 @@ cachy 0.1.0 0.2.0 Cachy package
assert
expected
==
tester
.
io
.
fetch_output
()
def
test_show_outdated_with_only_up_to_date_packages
(
app
,
poetry
,
installed
,
repo
):
command
=
app
.
find
(
"show"
)
tester
=
CommandTester
(
command
)
cachy_020
=
get_package
(
"cachy"
,
"0.2.0"
)
cachy_020
.
description
=
"Cachy package"
installed
.
add_package
(
cachy_020
)
repo
.
add_package
(
cachy_020
)
poetry
.
locker
.
mock_lock_data
(
{
"package"
:
[
{
"name"
:
"cachy"
,
"version"
:
"0.2.0"
,
"description"
:
"Cachy package"
,
"category"
:
"main"
,
"optional"
:
False
,
"platform"
:
"*"
,
"python-versions"
:
"*"
,
"checksum"
:
[],
},
],
"metadata"
:
{
"python-versions"
:
"*"
,
"platform"
:
"*"
,
"content-hash"
:
"123456789"
,
"hashes"
:
{
"cachy"
:
[]},
},
}
)
tester
.
execute
(
"--outdated"
)
expected
=
""
assert
expected
==
tester
.
io
.
fetch_output
()
def
test_show_outdated_has_prerelease_but_not_allowed
(
app
,
poetry
,
installed
,
repo
):
command
=
app
.
find
(
"show"
)
tester
=
CommandTester
(
command
)
...
...
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