summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_misc.py3
-rw-r--r--tests/test_oddball.py5
2 files changed, 7 insertions, 1 deletions
diff --git a/tests/test_misc.py b/tests/test_misc.py
index ef4a8774..23bd69fd 100644
--- a/tests/test_misc.py
+++ b/tests/test_misc.py
@@ -1,4 +1,5 @@
"""Tests of miscellaneous stuff."""
+import sys
from coverage.misc import Hasher, file_be_gone
from coverage import __version__, __url__
@@ -61,6 +62,8 @@ class SetupPyTest(CoverageTest):
self.assertIn("Ned Batchelder", out[3])
def test_more_metadata(self):
+ # Let's be sure we pick up our own setup.py
+ sys.path.insert(0, '')
from setup import setup_args
classifiers = setup_args['classifiers']
diff --git a/tests/test_oddball.py b/tests/test_oddball.py
index 60fab48f..f136eb49 100644
--- a/tests/test_oddball.py
+++ b/tests/test_oddball.py
@@ -306,7 +306,10 @@ class ExceptionTest(CoverageTest):
lines = cov.data.line_data()
clean_lines = {}
for f, llist in lines.items():
- if f == __file__:
+ # f is a path to a python module, so we drop the '.py' to get
+ # a callname
+ callname = os.path.basename(f)[:-3]
+ if callname not in callnames:
# ignore this file.
continue
clean_lines[os.path.basename(f)] = llist