Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows and MacOS units fail discovery on Linux #676

Open
jaraco opened this issue Apr 8, 2024 · 5 comments
Open

Windows and MacOS units fail discovery on Linux #676

jaraco opened this issue Apr 8, 2024 · 5 comments

Comments

@jaraco
Copy link
Owner

jaraco commented Apr 8, 2024

Just tested 25.1.0 and looks like now Windows and MacOS units are executed on Linux

+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-25.1.0~no_loopy_deps-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-keyring-25.1.0~no_loopy_deps-2.fc37.x86_64/usr/lib/python3.10/site-packages
+ dbus-run-session -- /usr/bin/pytest -ra -m 'not network'
==================================================================================== test session starts ====================================================================================
platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0
rootdir: /home/tkloczko/rpmbuild/BUILD/keyring-25.1.0
configfile: pytest.ini
plugins: flake8-1.1.1
collected 83 items / 2 errors

========================================================================================== ERRORS ===========================================================================================
______________________________________________________________________ ERROR collecting tests/backends/test_Windows.py ______________________________________________________________________
tests/backends/test_Windows.py:10: in <module>
    not keyring.backends.Windows.WinVaultKeyring.viable, reason="Needs Windows"
E   AttributeError: module 'keyring.backends' has no attribute 'Windows'
_______________________________________________________________________ ERROR collecting tests/backends/test_macOS.py _______________________________________________________________________
tests/backends/test_macOS.py:9: in <module>
    not keyring.backends.macOS.Keyring.viable,
E   AttributeError: module 'keyring.backends' has no attribute 'macOS'
================================================================================== short test summary info ==================================================================================
ERROR tests/backends/test_Windows.py - AttributeError: module 'keyring.backends' has no attribute 'Windows'
ERROR tests/backends/test_macOS.py - AttributeError: module 'keyring.backends' has no attribute 'macOS'
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
===================================================================================== 2 errors in 0.36s =====================================================================================

Originally posted by @kloczek in #581 (comment)

@jaraco
Copy link
Owner Author

jaraco commented Apr 8, 2024

See also the six comments from #581 (comment) where I've done some triage on this issue.

@jaraco
Copy link
Owner Author

jaraco commented Apr 8, 2024

I've been able to replicate the failure against a local checkout using:

FROM jaraco/multipy-tox

RUN py -m pip install pytest
WORKDIR src
CMD py -m pytest

And executing docker with -v @$(pwd):/src

@jaraco
Copy link
Owner Author

jaraco commented Apr 8, 2024

I've found that I can minimize the project quite a bit and the failure still occurs, but two different changes can work around the issue:

  • Pin to pytest<8.1
  • remove --doctest-modules

I think I'm getting close to a minimal reproducer.

@jaraco
Copy link
Owner Author

jaraco commented Apr 8, 2024

Reported issue upstream as pytest-dev/pytest#12194.

@jaraco
Copy link
Owner Author

jaraco commented Apr 8, 2024

For reference, I pushed my minimizing troubleshooting to refs/archive/troubleshoot-676.

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

No branches or pull requests

1 participant