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 data isn't properly reported for Python 3+ #49

Open
jmvrbanac opened this issue Dec 23, 2014 · 1 comment
Open

Coverage data isn't properly reported for Python 3+ #49

jmvrbanac opened this issue Dec 23, 2014 · 1 comment

Comments

@jmvrbanac
Copy link
Owner

I'm wondering if this issue is due to an issue with Pynsive's module loading process as this resembles the issue that I fixed in Pynsive to support coverage in Python 2.7.

Coverage report for Python 3.4.x

py34 runtests: commands[1] | coverage report -m
Name               Stmts   Miss  Cover   Missing
------------------------------------------------
lplight/__init__       0      0   100%   
lplight/client        54     54     0%   1-101
lplight/models       124    124     0%   1-143
------------------------------------------------
TOTAL                178    178     0%   
_________________________________________

Coverage report for Python 2.7.x

py27 runtests: commands[1] | coverage report -m
Name               Stmts   Miss Branch BrMiss  Cover   Missing
--------------------------------------------------------------
lplight/__init__       0      0      0      0   100%   
lplight/client        54     54     12     12     0%   1-101
lplight/models       124      0      4      1    99%   8->7
--------------------------------------------------------------
TOTAL                178     54     16     13    65%   
@jmvrbanac jmvrbanac added the bug label Dec 23, 2014
@jmvrbanac jmvrbanac added the ready label Jan 1, 2015
@jmvrbanac jmvrbanac added this to the 0.2.1 milestone Mar 30, 2015
@jmvrbanac jmvrbanac self-assigned this Mar 30, 2015
jmvrbanac added a commit to jmvrbanac/pynsive that referenced this issue Mar 30, 2015
In Python versions >= 3.1, other importers get added to the
sys.meta_path. Unfortunately, this causes installed packages
to override Pynsive loaded plugins. Causing things like
coverage information to be improperly reported on Pynsive loaded
modules in Python 3. This also resolves:
jmvrbanac/Specter#49
@jmvrbanac jmvrbanac modified the milestones: 0.2.1, 0.2.2 Apr 13, 2015
@jmvrbanac
Copy link
Owner Author

Switching to Pike for module loading (in 0.3.0) fixed the majority of the problems. However, there is still an outstanding problem with getting Python 3 coverage via specter --coverage .

Workaround

  • coverage run -m specter

@jmvrbanac jmvrbanac removed this from the 0.2.2 milestone May 21, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant