From 786cc6ef2f546bd5c3af68f8ed454e91c8093fba Mon Sep 17 00:00:00 2001 From: Artemiy Date: Thu, 24 Jan 2019 21:29:35 +0300 Subject: [PATCH 1/2] add test for counting pre option and fix it's duplicate --- pipenv/cli/options.py | 1 - tests/unit/test_help.py | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pipenv/cli/options.py b/pipenv/cli/options.py index 745275ddd1..d6be0bac08 100644 --- a/pipenv/cli/options.py +++ b/pipenv/cli/options.py @@ -375,7 +375,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) diff --git a/tests/unit/test_help.py b/tests/unit/test_help.py index 2432e96996..d37556018a 100644 --- a/tests/unit/test_help.py +++ b/tests/unit/test_help.py @@ -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) + 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 From e79a9568a8cc220f193b0bd3e202ec297c883a65 Mon Sep 17 00:00:00 2001 From: Dan Ryan Date: Sun, 26 May 2019 17:21:54 -0400 Subject: [PATCH 2/2] Add news entry for PR 3479 --- news/3479.bugfix.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/3479.bugfix.rst diff --git a/news/3479.bugfix.rst b/news/3479.bugfix.rst new file mode 100644 index 0000000000..15e8e0f652 --- /dev/null +++ b/news/3479.bugfix.rst @@ -0,0 +1 @@ +Fixed an issue which caused ``pipenv install --help`` to show duplicate entries for ``--pre``.