1 # Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 |
|
2 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt |
|
3 |
|
4 """Code coverage measurement for Python. |
|
5 |
|
6 Ned Batchelder |
|
7 http://nedbatchelder.com/code/coverage |
|
8 |
|
9 """ |
|
10 |
|
11 from coverage.version import __version__, __url__, version_info |
|
12 |
|
13 from coverage.control import Coverage, process_startup |
|
14 from coverage.data import CoverageData |
|
15 from coverage.misc import CoverageException |
|
16 from coverage.plugin import CoveragePlugin, FileTracer, FileReporter |
|
17 from coverage.pytracer import PyTracer |
|
18 |
|
19 # Backward compatibility. |
|
20 coverage = Coverage |
|
21 |
|
22 # On Windows, we encode and decode deep enough that something goes wrong and |
|
23 # the encodings.utf_8 module is loaded and then unloaded, I don't know why. |
|
24 # Adding a reference here prevents it from being unloaded. Yuk. |
|
25 import encodings.utf_8 |
|
26 |
|
27 # Because of the "from coverage.control import fooey" lines at the top of the |
|
28 # file, there's an entry for coverage.coverage in sys.modules, mapped to None. |
|
29 # This makes some inspection tools (like pydoc) unable to find the class |
|
30 # coverage.coverage. So remove that entry. |
|
31 import sys |
|
32 try: |
|
33 del sys.modules['coverage.coverage'] |
|
34 except KeyError: |
|
35 pass |
|
36 |
|
37 # |
|
38 # eflag: FileType = Python2 |
|