Skip to content

Testing fails when there is no keyrings.alt installed #737

@mtelka

Description

@mtelka
$ tox -e py314 -- -v

...

=================================================================================== FAILURES ====================================================================================
_____________________________________________________________________________ test_multiprocess_get _____________________________________________________________________________

    def test_multiprocess_get():
        proc1 = multiprocessing.Process(target=subprocess_get)
        proc1.start()
        proc1.join()
>       assert proc1.exitcode == 0
E       AssertionError: assert 1 == 0
E        +  where 1 = <Process name='Process-1' pid=548565 parent=548553 stopped exitcode=1>.exitcode

tests/test_multiprocess.py:35: AssertionError
----------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3.14/multiprocessing/process.py", line 320, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/usr/lib/python3.14/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/builds/ul-workspace/components/python/keyring/keyring-25.7.0/tests/test_multiprocess.py", line 20, in subprocess_get
    keyring.get_password('test_app', 'test_user')
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/builds/ul-workspace/components/python/keyring/keyring-25.7.0/keyring/core.py", line 65, in get_password
    return get_keyring().get_password(service_name, username)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/builds/ul-workspace/components/python/keyring/keyring-25.7.0/keyring/backends/fail.py", line 28, in get_password
    raise NoKeyringError(msg)
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.
____________________________________________________________________ test_multiprocess_get_after_native_get _____________________________________________________________________

    def test_multiprocess_get_after_native_get():
        keyring.get_password('test_app', 'test_user')
>       test_multiprocess_get()

tests/test_multiprocess.py:40: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    def test_multiprocess_get():
        proc1 = multiprocessing.Process(target=subprocess_get)
        proc1.start()
        proc1.join()
>       assert proc1.exitcode == 0
E       AssertionError: assert 1 == 0
E        +  where 1 = <Process name='Process-2' pid=548569 parent=548553 stopped exitcode=1>.exitcode

tests/test_multiprocess.py:35: AssertionError
----------------------------------------------------------------------------- Captured stderr call ------------------------------------------------------------------------------
Process Process-2:
Traceback (most recent call last):
  File "/usr/lib/python3.14/multiprocessing/process.py", line 320, in _bootstrap
    self.run()
    ~~~~~~~~^^
  File "/usr/lib/python3.14/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
    ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/builds/ul-workspace/components/python/keyring/keyring-25.7.0/tests/test_multiprocess.py", line 20, in subprocess_get
    keyring.get_password('test_app', 'test_user')
    ~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/builds/ul-workspace/components/python/keyring/keyring-25.7.0/keyring/core.py", line 65, in get_password
    return get_keyring().get_password(service_name, username)
           ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
  File "/data/builds/ul-workspace/components/python/keyring/keyring-25.7.0/keyring/backends/fail.py", line 28, in get_password
    raise NoKeyringError(msg)
keyring.errors.NoKeyringError: No recommended backend was available. Install a recommended 3rd party backend package; or, install the keyrings.alt package if you want to use the non-recommended backends. See https://pypi.org/project/keyring for details.

I noticed that it is enough to install keyrings.alt on the host machine. The installation to tox's virtualenv is not needed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions