Skip to content

Commit 629de94

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 497761c commit 629de94

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
@@ -369,18 +369,34 @@ def auth_needed(request: pytest.FixtureRequest) -> bool:
369369

370370
@pytest.fixture(
371371
params=(
372-
False,
373-
True,
372+
(False, False, False),
373+
(False, True, False),
374+
(True, True, False),
375+
(True, False, True),
376+
),
377+
ids=(
378+
"default-default",
379+
"default-force_keyring",
380+
"no_input-force_keyring",
381+
"no_input-default",
374382
),
375-
ids=("default", "no_input"),
376383
)
377-
def flags(request: pytest.FixtureRequest) -> typing.List[str]:
378-
no_input = request.param # type: ignore[attr-defined]
384+
def flags(request: pytest.FixtureRequest, auth_needed: bool) -> typing.List[str]:
385+
(
386+
no_input,
387+
force_keyring,
388+
xfail,
389+
) = request.param # type: ignore[attr-defined]
379390

380391
flags = []
381392
if no_input:
382393
flags.append("--no-input")
383-
394+
if force_keyring:
395+
flags.append(
396+
"--force-keyring",
397+
)
398+
if auth_needed and xfail:
399+
request.applymarker(pytest.mark.xfail())
384400
return flags
385401

386402

0 commit comments

Comments
 (0)