diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-07 19:38:26 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-07 19:38:26 -0500 |
commit | 746fc885e42d7f746ae1501cd83ce3fb373791af (patch) | |
tree | 7d07e8ccb37d9d7af0f0d1b6ab0d30acf5275e17 /coverage/__init__.py | |
parent | 3321245ed534e1d6865824cf5accec9968c65ff2 (diff) | |
download | python-coveragepy-git-746fc885e42d7f746ae1501cd83ce3fb373791af.tar.gz |
Remove an odd sys.modules entry so that pydoc can find coverage.coverage. #206.
Diffstat (limited to 'coverage/__init__.py')
-rw-r--r-- | coverage/__init__.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/coverage/__init__.py b/coverage/__init__.py index 2fc49d0f..4d82375c 100644 --- a/coverage/__init__.py +++ b/coverage/__init__.py @@ -78,6 +78,12 @@ analysis2 = _singleton_method('analysis2') report = _singleton_method('report') annotate = _singleton_method('annotate') +# Because of the "from coverage.control import fooey" lines at the top of the +# file, there's an entry for coverage.coverage in sys.modules, mapped to None. +# This makes some inspection tools (like pydoc) unable to find the class +# coverage.coverage. So remove that entry. +import sys +del sys.modules['coverage.coverage'] # COPYRIGHT AND LICENSE # |