-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
Explain what happens
Description:
I'm trying to run the Cockpit test suite as described in HACKING.md, but make pytest
fails due to missing task
module in test/common/lcov.py
.
Steps to reproduce:
- Clone the Cockpit repository (main branch, commit: d943016).
- Create and enter the toolbox.
From the root directory run:
./autogen.sh --prefix=/usr --enable-debug
make
make check
make pytest
Observed result:
[...]
ImportError while importing test module '/home/ubuntu/src/cockpit/test/pytest/test_browser.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.13/importlib/__init__.py:88: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
test/pytest/test_browser.py:8: in <module>
import lcov
test/common/lcov.py:39: in <module>
from task import github
E ModuleNotFoundError: No module named 'task'
[...]
Analysis:
- The file
test/common/lcov.py
importsfrom task import github
, but thetask
module does not exist anywhere in the repository. - Commenting out the import allows
make pytest
to proceed and run tests.
Expected result:
make pytest
should (?) run cleanly without modification, or the import should be guarded or removed if it's obsolete.
Environment:
- OS: Ubuntu 25.04 (using toolbox)
- Python: 3.13.5
- pytest: 8.3.4
- Cockpit branch:
main
(commit: d943016)
Thanks for maintaining Cockpit! Let me know if you'd like help submitting a patch.
Version of Cockpit
n/a
Where is the problem in Cockpit?
None
Server operating system
Ubuntu
Server operating system version
25.04
What browsers are you using?
Chrome, Firefox