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

'tox -e coverage' is failing #199

Closed
tseaver opened this issue May 27, 2024 · 1 comment · Fixed by #200
Closed

'tox -e coverage' is failing #199

tseaver opened this issue May 27, 2024 · 1 comment · Fixed by #200

Comments

@tseaver
Copy link
Member

tseaver commented May 27, 2024

@dataflake, @icemac either of you understand this failure?

$ git status
On branch master
Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
$ git log -1
commit ec5f1a02896da407da3860b82949aa70805f26d2 (HEAD -> master, origin/master, origin/HEAD)
Merge: a522866f 4a680bbf
Author: Jens Vagelpohl <jens@plyp.com>
Date:   Sat May 25 08:43:45 2024 +0000

    Merge pull request #198 from zopefoundation/config-with-c-code-template-4dc0484e
    
    Update meta/config template to publish Windows wheels to PyP
$ .tox/coverage/bin/coverage run -m zope.testrunner --test-path=src -v
Running tests at level 1
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
  Running:
.......................................................................................................................................................................................................
 ...
...........................................................................................................................................................
  Ran 771 tests with 0 failures, 0 errors and 6 skipped in 0.518 seconds.
Tearing down left over layers:
  Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.
...t/.tox/coverage/lib/python3.12/site-packages/coverage/control.py:888: CoverageWarning: No data was collected. (no-data-collected)
  self._warn("No data was collected.", slug="no-data-collected")

The apparent fix is to tweak .coveragerc as follows:

diff --git a/.coveragerc b/.coveragerc
index b102ff0a..87ec818d 100644
--- a/.coveragerc
+++ b/.coveragerc
@@ -1,7 +1,7 @@
 # Generated from:
 # https://github.com/zopefoundation/meta/tree/master/config/c-code
 [run]
-source = persistent
+source = src/persistent
 # New in 5.0; required for the GHA coveralls submission.
 relative_files = True
 branch = true

with (I assume) the equivalent tweak to .meta.toml to preserve the change:

diff --git a/.meta.toml b/.meta.toml
index 6297b125..e090600b 100644
--- a/.meta.toml
+++ b/.meta.toml
@@ -28,6 +28,7 @@ testenv-deps = [
 fail-under = 99.8
 
 [coverage-run]
+source = src/persistent
 additional-config = [
     "omit =",
     "     src/persistent/_ring_build.py",

I don't understand, though, why this is failing for persistent but not for e.g. BTrees or zodbpickle.

tseaver added a commit that referenced this issue May 27, 2024
@dataflake
Copy link
Member

I can't say much about .coveragerc, sorry

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

Successfully merging a pull request may close this issue.

2 participants