From 25e2807b018d54a70b35e44261ab5a6265348d27 Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Sun, 21 Apr 2013 17:17:45 -0400 Subject: Tweaks to Matt's merged pull request. --- tests/test_misc.py | 1 + tests/test_oddball.py | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/test_misc.py b/tests/test_misc.py index 23bd69fd..e7fa436a 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -63,6 +63,7 @@ class SetupPyTest(CoverageTest): def test_more_metadata(self): # Let's be sure we pick up our own setup.py + # CoverageTest.tearDown restores the original sys.path. sys.path.insert(0, '') from setup import setup_args diff --git a/tests/test_oddball.py b/tests/test_oddball.py index f136eb49..3352a0cf 100644 --- a/tests/test_oddball.py +++ b/tests/test_oddball.py @@ -308,11 +308,10 @@ class ExceptionTest(CoverageTest): for f, llist in lines.items(): # 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 + basename = os.path.basename(f) + assert basename.endswith(".py") + if basename[:-3] in callnames: + clean_lines[basename] = llist self.assertEqual(clean_lines, lines_expected) -- cgit v1.2.1