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

config tool: coverage call failed #31

Open
jugmac00 opened this issue May 15, 2020 · 1 comment
Open

config tool: coverage call failed #31

jugmac00 opened this issue May 15, 2020 · 1 comment

Comments

@jugmac00
Copy link
Member

jugmac00 commented May 15, 2020

When I worked on zc.zdaemonrecipe the config tool generated a coverage call like
coverage run -m zope.testrunner --test-path=src [].

The src thing left aside (I changed it to zc), this still did not work until I deleted the --test-path option.

So this worked:
coverage run -m zope.testrunner

I never use coverage, only pytest-cov, so I have no clue how to configure coverage correctly.

coverage run-test: commands[0] | coverage run -m zope.testrunner --test-path=zc
Test-module import failures:

Module: zdaemonrecipe.tests

ModuleNotFoundError: No module named 'zdaemonrecipe'



Test-modules with import problems:
  zdaemonrecipe.tests
Total: 0 tests, 0 failures, 1 errors and 0 skipped in 0.000 seconds.
Coverage.py warning: No data was collected. (no-data-collected)
ERROR: InvocationError for command /home/jugmac00/Repos/zopefoundation/zc.zdaemonrecipe/.tox/coverage/bin/coverage run -m zope.testrunner --test-path=zc (exited with code 1)
@mgedmin
Copy link
Member

mgedmin commented May 15, 2020

This has nothing to do with coverage, it's a zope-testrunner thing. The correct --test-path for src-less packages is ..

It might result in zope.testrunning picking up more tests than it should. Another reason to use src/ layouts everywhere...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants