Skip to content

Commit f24cfb9

Browse files
DarsstarDos Moonen
authored and
Dos Moonen
committed
Parameterized tests/functional/test_install_config.py::test_prompt_for_keyring_if_needed to add a few --no-input and --force-keyring scenarios
1 parent 0c4e786 commit f24cfb9

File tree

1 file changed

+22
-6
lines changed

1 file changed

+22
-6
lines changed

tests/functional/test_install_config.py

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -360,18 +360,34 @@ def auth_needed(request: pytest.FixtureRequest) -> bool:
360360

361361
@pytest.fixture(
362362
params=(
363-
False,
364-
True,
363+
(False, False, False),
364+
(False, True, False),
365+
(True, True, False),
366+
(True, False, True),
367+
),
368+
ids=(
369+
"default-default",
370+
"default-force_keyring",
371+
"no_input-force_keyring",
372+
"no_input-default",
365373
),
366-
ids=("default", "no_input"),
367374
)
368-
def flags(request: pytest.FixtureRequest) -> typing.List[str]:
369-
no_input = request.param # type: ignore[attr-defined]
375+
def flags(request: pytest.FixtureRequest, auth_needed: bool) -> typing.List[str]:
376+
(
377+
no_input,
378+
force_keyring,
379+
xfail,
380+
) = request.param # type: ignore[attr-defined]
370381

371382
flags = []
372383
if no_input:
373384
flags.append("--no-input")
374-
385+
if force_keyring:
386+
flags.append(
387+
"--force-keyring",
388+
)
389+
if auth_needed and xfail:
390+
request.applymarker(pytest.mark.xfail())
375391
return flags
376392

377393

0 commit comments

Comments
 (0)