inv test failing on Windows
Closed this issue · 0 comments
fohrloop commented
Expected behavior
Running:
inv test
will run tests and show 100% coverage.
Actual behavior
This is printed out to console:
(venv) PS C:\cases\wakepy> inv test
Running: env -u DBUS_SESSION_BUS_ADDRESS python -m pytest -W error --cov-branch --cov wakepy --cov-fail-under=100
============================= test session starts =============================
platform win32 -- Python 3.10.2, pytest-8.1.1, pluggy-1.5.0
rootdir: C:\cases\wakepy
configfile: pyproject.toml
plugins: cov-4.1.0, time-machine-2.14.0
collected 266 items / 1 skipped
tests\unit\test__init__.py .s.. [ 1%]
tests\unit\test_core\test_activationresult.py ...................... [ 9%]
tests\unit\test_core\test_calls.py ............... [ 15%]
tests\unit\test_core\test_constants.py ... [ 16%]
tests\unit\test_core\test_dbus.py ....... [ 19%]
tests\unit\test_core\test_heartbeat.py . [ 19%]
tests\unit\test_core\test_method\test_activation.py .................... [ 27%]
............. [ 31%]
tests\unit\test_core\test_method\test_method.py ...... [ 34%]
tests\unit\test_core\test_mode.py ...................................... [ 48%]
................ [ 54%]
tests\unit\test_core\test_platform.py .... [ 56%]
tests\unit\test_core\test_prioritization.py ............................ [ 66%]
.. [ 67%]
tests\unit\test_core\test_registry.py ..... [ 69%]
tests\unit\test_core\test_strenum.py ...... [ 71%]
tests\unit\test_main.py .............. [ 76%]
tests\unit\test_methods\test_freedesktop.py ...................... [ 84%]
tests\unit\test_methods\test_gnome.py ........ [ 87%]
tests\unit\test_methods\test_macos.py .... [ 89%]
tests\unit\test_methods\test_windows.py ........ [ 92%]
tests\unit\test_modes.py .................... [100%]C:\cases\wakepy\venv\lib\site-packages\coverage\control.py:888: CoverageWarning: No data was collected. (no-data-collected)
self._warn("No data was collected.", slug="no-data-collected")
WARNING: Failed to generate report: No data to report.
c:\cases\wakepy\venv\lib\site-packages\pytest_cov\plugin.py:312: CovReportWarning: Failed to generate report: No data to report.
warnings.warn(CovReportWarning(message))
---------- coverage: platform win32, python 3.10.2-final-0 -----------
FAIL Required test coverage of 100% not reached. Total coverage: 0.00%
======================= 265 passed, 2 skipped in 3.11s ========================
Running: coverage html && python -m webbrowser -t htmlcov/index.html
No data to report.
Versions
main branch commit c6f17a9
.
Notes
Same happens when running
python -m pytest -W error --cov-branch --cov wakepy --cov-fail-under=100
directly