Windows and MacOS units fail discovery on Linux
- Dominant language
- Python
- Stars
- 1.5k
- Forks
- 196
- PR merge metrics
- No merged PRs in 30d
Description
Just tested 25.1.0 and looks like now Windows and MacOS units are executed on Linux
```console
+ 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
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
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 https://github.com/jaraco/keyring/issues/581#issuecomment-2041182832_
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with tests/backends/test_Windows.py and tests/backends/test_macOS.py, then reproduce the reported pytest collection failure on Linux. Check how these platform-specific tests are imported and guarded, and consider the issue done when the Linux test suite collects without AttributeError while Windows and macOS coverage remains available on those platforms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100