Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/3479.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed an issue which caused ``pipenv install --help`` to show duplicate entries for ``--pre``.
1 change: 0 additions & 1 deletion pipenv/cli/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,6 @@ def install_options(f):
f = index_option(f)
f = extra_index_option(f)
f = requirementstxt_option(f)
f = pre_option(f)
f = selective_upgrade_option(f)
f = ignore_pipfile_option(f)
f = editable_option(f)
Expand Down
13 changes: 13 additions & 0 deletions tests/unit/test_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,16 @@ def test_help():
stderr=subprocess.STDOUT, env=os.environ.copy(),
)
assert output


def test_count_of_description_pre_option():
test_command = 'pipenv install --help'
test_line = '--pre Allow pre-releases.'
out = subprocess.Popen(test_command.split(), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This case should be in integration directory and use PipenvInstance to keep consistency.

stdout, _ = out.communicate()
lines = stdout.decode().split('\n')
count = 0
for line in lines:
if line.strip().split() == test_line.split():
count += 1
assert count == 1