diff options
author | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-11-08 23:10:20 (GMT) |
---|---|---|
committer | Alexander Belopolsky <alexander.belopolsky@gmail.com> | 2010-11-08 23:10:20 (GMT) |
commit | 18c33737f85ca399bb4fc609d2f05eb05a61bbb0 (patch) | |
tree | 4487ee8fe3ad6e9a457933c490e891893fc23826 /Lib/test/test_trace.py | |
parent | 2f02a511353c761bef2ab867ca4295bbb0217b96 (diff) | |
download | cpython-18c33737f85ca399bb4fc609d2f05eb05a61bbb0.zip cpython-18c33737f85ca399bb4fc609d2f05eb05a61bbb0.tar.gz cpython-18c33737f85ca399bb4fc609d2f05eb05a61bbb0.tar.bz2 |
Fixed unit test failure on Windows
Diffstat (limited to 'Lib/test/test_trace.py')
-rw-r--r-- | Lib/test/test_trace.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_trace.py b/Lib/test/test_trace.py index 9c018b7..1311547 100644 --- a/Lib/test/test_trace.py +++ b/Lib/test/test_trace.py @@ -339,14 +339,15 @@ class TestCoverage(unittest.TestCase): ### regrtest is invoked with -T option. class Test_Ignore(unittest.TestCase): def test_ignored(self): - ignore = trace.Ignore(['x', 'y.z'], ['/foo/bar']) + jn = os.path.join + ignore = trace.Ignore(['x', 'y.z'], [jn('foo', 'bar')]) self.assertTrue(ignore.names('x.py', 'x')) self.assertFalse(ignore.names('xy.py', 'xy')) self.assertFalse(ignore.names('y.py', 'y')) - self.assertTrue(ignore.names('/foo/bar/baz.py', 'baz')) - self.assertFalse(ignore.names('bar/z.py', 'z')) + self.assertTrue(ignore.names(jn('foo', 'bar', 'baz.py'), 'baz')) + self.assertFalse(ignore.names(jn('bar', 'z.py'), 'z')) # Matched before. - self.assertTrue(ignore.names('bar/baz.py', 'baz')) + self.assertTrue(ignore.names(jn('bar', 'baz.py'), 'baz')) def test_main(): |