Skip to content

Skip multiprocess tests without a usable keyring backend - #761

Open
l46983284-cpu wants to merge 1 commit into
jaraco:mainfrom
l46983284-cpu:fix-737-skip-multiprocess-without-backend
Open

Skip multiprocess tests without a usable keyring backend#761
l46983284-cpu wants to merge 1 commit into
jaraco:mainfrom
l46983284-cpu:fix-737-skip-multiprocess-without-backend

Conversation

@l46983284-cpu

Copy link
Copy Markdown

Multiprocess tests call keyring.get_password in a child process. When no recommended backend (and no keyrings.alt) is available, the selected backend is keyring.backends.fail.Keyring and the child exits non-zero with NoKeyringError.

Skip those tests when the selected keyring is the fail backend, with a reason that points at installing a recommended backend or keyrings.alt. Keep the existing Linux #410 xfail.

Test plan

  • Host with only the fail backend: python3 -m pytest -q tests/test_multiprocess.py → 2 skipped, exit 0
  • Does not require keyrings.alt for a green run

Fixes #737

When only the fail backend is available (no recommended backend or
keyrings.alt), child processes raise NoKeyringError and the suite
fails. Skip those tests instead of requiring optional packages.

Fixes jaraco#737

Signed-off-by: Alex Chen <l46983284@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Testing fails when there is no keyrings.alt installed

1 participant