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 broken by peak.util.addons #13

Closed
nedbat opened this issue Jul 26, 2009 · 2 comments
Closed

coverage broken by peak.util.addons #13

nedbat opened this issue Jul 26, 2009 · 2 comments
Labels
bug Something isn't working

Comments

@nedbat
Copy link
Owner

nedbat commented Jul 26, 2009

Originally reported by shauncutts (Bitbucket: shauncutts, GitHub: Unknown)


say we have test1.py such as:

#!python
# from peak.util.addons import AddOn

def foo():
  print "bar"

foo()

Now, if I run coverage on this

#!shell
> coverage -e -x test.py
> coverage -r test.py
Name    Stmts   Exec  Cover
---------------------------
test        3      3   100%

it works fine. However, with the first "include" line uncommented, it breaks:

#!shell
> coverage -e -x test.py
> coverage -r test.py
Name    Stmts   Exec  Cover
---------------------------
test        4      1    25%

If coverage is being run by nosetests, then it reports 0 coverage for all modules after the first one with an "addons" include.

-- Shaun

PS -- Great tool, by the way. I'd try to do more diagnosis if I weren't in the middle of a coding grind.


@nedbat
Copy link
Owner Author

nedbat commented Aug 9, 2009

The fix for this is in <<changeset a480f40d1fa4 (bb)>>, but you have to enable it with the --timid flag, or setenv COVERAGE_OPTIONS="--timid"

@nedbat nedbat closed this as completed Aug 9, 2009
@nedbat
Copy link
Owner Author

nedbat commented Feb 25, 2010

Removing version: 3.0.1 (automated comment)

@nedbat nedbat added major bug Something isn't working labels Jun 23, 2018
agronholm added a commit to agronholm/coveragepy that referenced this issue Aug 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant