Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Resolve coverage issues in PyUtilib #14

Open
whart222 opened this issue Nov 15, 2015 · 0 comments
Open

Resolve coverage issues in PyUtilib #14

whart222 opened this issue Nov 15, 2015 · 0 comments

Comments

@whart222
Copy link
Contributor

PyUtilib has a prolific habit of running, "from pyutilib.X import *" within the module init.py. While this is "convenient" for many users, I think it needs to either be removed or severely reduced.

In particular:

  1. This is prevents getting accurate coverage information. Nose is missing the coverage statistics for module-level lines (like def X():). These lines are parsed when the file is initially imported and, due to the __init__.py imports, this occurs before Nose activates the coverage plugin -- thus the lines are all showing up as uncovered.
  2. It makes it harder to trace program flow. Client code runs things like
    from pyutilib.misc import import_file, PauseGC

but a user has no way to know from which file in pyutilib/misc/* those symbols come from (BTW, they don't come from the same file!).

@whart222 whart222 added this to the PyUtilib 5.x milestone Nov 15, 2015
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

1 participant