diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-11 19:44:45 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-11 19:44:45 -0500 |
commit | 801927ac59c64e52cf3503bdff6b144a466180b3 (patch) | |
tree | 11be69aa215b24d207dcdf155add4a5044a25a33 /test | |
parent | dd2256488bfcccabb9b27f6af082558f00204224 (diff) | |
download | python-coveragepy-801927ac59c64e52cf3503bdff6b144a466180b3.tar.gz |
No longer see a mysterious exception when not able to run code: AttributeError: 'NoneType' object has no attribute 'isabs'. #153
Diffstat (limited to 'test')
-rw-r--r-- | test/test_api.py | 1 | ||||
-rw-r--r-- | test/test_oddball.py | 1 | ||||
-rw-r--r-- | test/test_process.py | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/test/test_api.py b/test/test_api.py index 4042d0a..e2ebc65 100644 --- a/test/test_api.py +++ b/test/test_api.py @@ -429,6 +429,7 @@ class SourceOmitIncludeTest(OmitIncludeTestsMixin, CoverageTest): cov.start() import usepkgs # pylint: disable=F0401,W0612 cov.stop() + cov._harvest_data() # private! sshhh... summary = cov.data.summary() for k, v in list(summary.items()): assert k.endswith(".py") diff --git a/test/test_oddball.py b/test/test_oddball.py index 1a3bd22..a8c243d 100644 --- a/test/test_oddball.py +++ b/test/test_oddball.py @@ -307,6 +307,7 @@ class ExceptionTest(CoverageTest): # Clean the line data and compare to expected results. # The filenames are absolute, so keep just the base. + cov._harvest_data() # private! sshhh... lines = cov.data.line_data() clean_lines = {} for f, llist in lines.items(): diff --git a/test/test_process.py b/test/test_process.py index d33dac5..259bf25 100644 --- a/test/test_process.py +++ b/test/test_process.py @@ -358,6 +358,7 @@ class ProcessTest(CoverageTest): out = self.run_command("coverage run i_dont_exist.py") self.assertIn("No file to run: 'i_dont_exist.py'", out) self.assertNotIn("warning", out) + self.assertNotIn("Exception", out) out = self.run_command("coverage run -m no_such_module") self.assertTrue( @@ -365,6 +366,7 @@ class ProcessTest(CoverageTest): ("No module named 'no_such_module'" in out) ) self.assertNotIn("warning", out) + self.assertNotIn("Exception", out) if sys.version_info >= (3, 0): # This only works on 3.x for now. # It only works with the C tracer. |