Open peterdesmet opened 1 year ago
@peterdesmet damn, It seems that it does not relate to the unit tests as I see in your output:
...
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_check_source_file_wrong_file PASSED [100%]
and it also works in the Mac github action.
but rather with creating the coverage results. Can you retry with the .coverage.Peters-MacBook-Air.local.50618.245710-journal
or other .coverage
files/folders removed inside your repo folder?
Running tox
from the repository root creates 66 coverage files. One named .coverage
and 65 named .coverage.Peters-MacBook-Air.local.<integer>.<integer>
tox
again results in the same error..coveragerc
results in:/Users/peter_desmet/Coding/Repositories/enram/vptstools/.tox/py39/lib/python3.9/site-packages/coverage/data.py:166: CoverageWarning: Data file '/Users/peter_desmet/Coding/Repositories/enram/vptstools/.coverage.Peters-MacBook-Air.local.57123.052681' doesn't seem to be a coverage data file:
data._warn(str(exc))
/Users/peter_desmet/Coding/Repositories/enram/vptstools/.tox/py39/lib/python3.9/site-packages/coverage/data.py:166: CoverageWarning: Couldn't use data file '/Users/peter_desmet/Coding/Repositories/enram/vptstools/.coverage.Peters-MacBook-Air.local.57176.003491-journal': file is not a database
data._warn(str(exc))
/Users/peter_desmet/Coding/Repositories/enram/vptstools/.tox/py39/lib/python3.9/site-packages/coverage/data.py:166: CoverageWarning: Couldn't use data file '/Users/peter_desmet/Coding/Repositories/enram/vptstools/.coverage.Peters-MacBook-Air.local.57178.263251-journal': file is not a database
data._warn(str(exc))
/Users/peter_desmet/Coding/Repositories/enram/vptstools/.tox/py39/lib/python3.9/site-packages/coverage/data.py:166: CoverageWarning: Data file '/Users/peter_desmet/Coding/Repositories/enram/vptstools/.coverage.Peters-MacBook-Air.local.57178.263251' doesn't seem to be a coverage data file:
data._warn(str(exc))
But with an indication that the tests have now succeeded.
Currently a warning:
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_int_to_nodata PASSED [ 95%]
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_int_to_nodata_wrong_type PASSED [ 96%]
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_number_to_bool_str PASSED [ 97%]
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_check_source_file PASSED [ 98%]
/Users/peter_desmet/Coding/Repositories/enram/vptstools/.tox/py39/lib/python3.9/site-packages/coverage/data.py:166: CoverageWarning: Couldn't use data file '/Users/peter_desmet/Coding/Repositories/enram/vptstools/.coverage.Peters-MacBook-Air.local.74805.766847-journal': file is not a database
data._warn(str(exc))
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_check_source_file_wrong_file PASSED [100%]
---------- coverage: platform darwin, python 3.9.6-final-0 -----------
Name Stmts Miss Branch BrPart Cover Missing
-------------------------------------------------------------------------------
src/vptstools/__init__.py 8 0 0 0 100%
src/vptstools/bin/vph5_to_vpts.py 64 1 16 1 98% 42
src/vptstools/odimh5.py 63 0 10 0 100%
src/vptstools/s3.py 97 0 10 0 100%
src/vptstools/vpts.py 97 0 22 0 100%
src/vptstools/vpts_csv.py 57 0 13 0 100%
-------------------------------------------------------------------------------
TOTAL 386 1 71 1 99%
============================================= 90 passed in 20.07s =============================================
.pkg: _exit> python /opt/homebrew/Cellar/tox/4.4.8/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py39: OK (27.08=setup[5.00]+cmd[22.08] seconds)
congratulations :) (27.12 seconds)
This issue does not occur in the CI: https://github.com/enram/vptstools/actions/runs/4561907488/jobs/8048440757#step:5:109
Note, I'm using tox 4.4.8, while the CI uses tox 3.27.1 (set fixed here)
@peterdesmet when working on the CI I encountered a similar issue. Can you try to use tox -e py
instead of just tox
? This runs tests only on current py-version instead of trying all of the enlisted and skipping when not available. The latter introduced an error on the .coverage in CI which I solved there with -e py parameter.
Started from a fresh repo and followed:
tox -e dev
source venv/bin/activate
tox -e py # rather than tox
Unfortunately, the error remained:
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_number_to_bool_str PASSED [ 97%]
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_check_source_file PASSED [ 98%]
/Users/peter_desmet/Coding/Repositories/enram/vptstools/.tox/py/lib/python3.11/site-packages/coverage/data.py:166: CoverageWarning: Data file '/Users/peter_desmet/Coding/Repositories/enram/vptstools/.coverage.Peters-MacBook-Air.local.93271.864909' doesn't seem to be a coverage data file:
data._warn(str(exc))
/Users/peter_desmet/Coding/Repositories/enram/vptstools/.tox/py/lib/python3.11/site-packages/coverage/data.py:166: CoverageWarning: Data file '/Users/peter_desmet/Coding/Repositories/enram/vptstools/.coverage.Peters-MacBook-Air.local.93326.698918' doesn't seem to be a coverage data file:
data._warn(str(exc))
/Users/peter_desmet/Coding/Repositories/enram/vptstools/.tox/py/lib/python3.11/site-packages/coverage/data.py:166: CoverageWarning: Data file '/Users/peter_desmet/Coding/Repositories/enram/vptstools/.coverage.Peters-MacBook-Air.local.93276.677394' doesn't seem to be a coverage data file:
data._warn(str(exc))
tests/test_vpts_csv.py::TestVptsCsvV1SupportFun::test_check_source_file_wrong_file PASSED [100%]
---------- coverage: platform darwin, python 3.11.3-final-0 ----------
Name Stmts Miss Branch BrPart Cover Missing
-------------------------------------------------------------------------------
src/vptstools/__init__.py 8 0 0 0 100%
src/vptstools/bin/vph5_to_vpts.py 64 1 22 1 98% 42
src/vptstools/odimh5.py 63 0 30 0 100%
src/vptstools/s3.py 97 0 30 0 100%
src/vptstools/vpts.py 97 0 30 0 100%
src/vptstools/vpts_csv.py 59 0 39 0 100%
-------------------------------------------------------------------------------
TOTAL 388 1 151 1 99%
=========================================================================== 90 passed in 21.89s ============================================================================
.pkg: _exit> python /opt/homebrew/Cellar/tox/4.5.1/libexec/lib/python3.11/site-packages/pyproject_api/_backend.py True setuptools.build_meta
py: OK (66.57=setup[35.13]+cmd[31.43] seconds)
congratulations :) (66.63 seconds)
tox -e dev
source venv/bin/activate
tox
Tests works fine until 98% after which I get an error: