Skip to content

Commit aba9e96

Browse files
committed
Add keyring option to failing test
1 parent fd3e5ed commit aba9e96

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

tests/unit/test_commands.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ def has_option_no_index(command: Command) -> bool:
7676

7777
@pytest.mark.parametrize("command_name", EXPECTED_INDEX_GROUP_COMMANDS)
7878
@pytest.mark.parametrize(
79-
"disable_pip_version_check, no_index, expected_called",
79+
"disable_pip_version_check, no_index, keyring, expected_called",
8080
[
8181
# pip_self_version_check() is only called when both
8282
# disable_pip_version_check and no_index are False.
83-
(False, False, True),
84-
(False, True, False),
85-
(True, False, False),
86-
(True, True, False),
83+
(False, False, False, True),
84+
(False, True, False, False),
85+
(True, False, False, False),
86+
(True, True, False, False),
8787
],
8888
)
8989
@mock.patch("pip._internal.cli.req_command.pip_self_version_check")
@@ -92,6 +92,7 @@ def test_index_group_handle_pip_version_check(
9292
command_name: str,
9393
disable_pip_version_check: bool,
9494
no_index: bool,
95+
keyring: bool,
9596
expected_called: bool,
9697
) -> None:
9798
"""
@@ -103,6 +104,7 @@ def test_index_group_handle_pip_version_check(
103104
options = command.parser.get_default_values()
104105
options.disable_pip_version_check = disable_pip_version_check
105106
options.no_index = no_index
107+
options.keyring = keyring
106108

107109
command.handle_pip_version_check(options)
108110
if expected_called:

0 commit comments

Comments
 (0)