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

Coverage tests fail on Windows CI with coverage 5.0 #250

Closed
rly opened this issue Jan 9, 2020 · 1 comment · Fixed by #251
Closed

Coverage tests fail on Windows CI with coverage 5.0 #250

rly opened this issue Jan 9, 2020 · 1 comment · Fixed by #251
Labels
category: bug errors in the code or code behavior

Comments

@rly
Copy link
Contributor

rly commented Jan 9, 2020

Error is:

(tox) λ tox -e coverage-py35
coverage-py35 recreate: C:\Users\Ryan\Documents\NWB\hdmf\.tox\coverage-py35
coverage-py35 installdeps: -rrequirements-dev.txt, -rrequirements.txt
WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
coverage-py35 develop-inst: C:\Users\Ryan\Documents\NWB\hdmf
WARNING: Discarding $PYTHONPATH from environment, to override specify PYTHONPATH in 'passenv' in your configuration.
coverage-py35 installed: certifi==2019.11.28,chardet==3.0.4,codecov==2.0.15,colorama==0.4.3,coverage==5.0.2,entrypoints==0.3,filelock==3.0.12,flake8==3.7.9,h5py==2.10.0,-e git+https://github.com/hdmf-dev/hdmf.git@9471e5ca425ade3a85ad949a463c5d716088dcd0#egg=hdmf,idna==2.8,importlib-metadata==1.3.0,mccabe==0.6.1,more-itertools==8.0.2,numpy==1.18.1,packaging==20.0,pandas==0.25.3,pluggy==0.13.1,py==1.8.1,pycodestyle==2.5.0,pyflakes==2.1.1,pyparsing==2.4.6,python-dateutil==2.8.1,pytz==2019.3,requests==2.22.0,ruamel.yaml==0.16.5,ruamel.yaml.clib==0.2.0,scipy==1.4.1,six==1.13.0,toml==0.10.0,tox==3.14.3,urllib3==1.25.7,virtualenv==16.7.9,zipp==0.6.0
coverage-py35 run-test-pre: PYTHONHASHSEED='53'
coverage-py35 run-test: commands[0] | coverage run test.py -u
Traceback (most recent call last):
  File "test.py", line 18, in <module>
    from tests.coloredtestrunner import ColoredTestRunner, ColoredTestResult
ImportError: No module named 'tests'
Coverage.py warning: No data was collected. (no-data-collected)
ERROR: InvocationError for command 'C:\Users\Ryan\Documents\NWB\hdmf\.tox\coverage-py35\Scripts\coverage.EXE' run test.py -u (exited with code 1)

There appears to be a change in how the python path is handled. This happens for python 3.5, 3.6, 3.7, and 3.8, and only on Windows - Mac and Linux are OK. This also only happens when upgrading to coverage 5.0.2 from 4.5.4.

This seems possibly related to nedbat/coveragepy#862

@rly rly added the category: bug errors in the code or code behavior label Jan 9, 2020
@rly
Copy link
Contributor Author

rly commented Jan 10, 2020

The workaround is to use "python -m coverage run (etc)" instead of "coverage run (etc)".

Also, I tried to debug the issue here: nedbat/coveragepy#862 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category: bug errors in the code or code behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant