-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
I cannot successfully obtain a report of coverage for the Cython module dd.cudd. I have:
- followed the Cython instructions for enabling coverage analysis
- ensured that
coverage.pywith its C extension are installed, in order for theCython.Coverageplugin to work.
I am using nosetests---I do not know whether nose can cause additional difficulties.
Directory layout under /path roughly:
dd/
tests/
Normally, I run nosetests within tests/, because I want to ensure that nosetests will import dd from site-packages (I have also tried the -w option of nosetests).
I have tried running nosetests both inside the tests/ directory, and above it.
nose does not report any results for cudd.pyx.
When nose --with-coverage --cover-package=dd runs under tests/, it creates a .coverage that mentions both a /path/tests/dd/cudd.pyx file (nonexistent), as well as the existing /path/dd/dd/cudd.pyx. For the existing file, coverage report complains that
/path/dd/dd/cudd.pyx NotPython:
Couldn't parse '/path/dd/dd/cudd.pyx' as Python source: 'invalid syntax' at line 20
Also, manually editing the wrong path reported in .coveragerc produces again the above error.
These observations are with:
cython == 0.25.1nose == 1.3.7coverage == 4.2
How can I get coverage to be reported for Cython modules? It seems that this may be a problem both with paths that coverage.py reports, and with failure of coverage.py to parse Cython syntax. I am unsure whether this should be addressed by cython (e.g., in the coverage.py plugin Cython.Coverage), or by coverage.py, or both.
May have some relevance to #1461.