[Python-checkins] r86342 - python/branches/py3k/Lib/test/test_trace.py

alexander.belopolsky python-checkins at python.org
Tue Nov 9 00:10:21 CET 2010


Author: alexander.belopolsky
Date: Tue Nov  9 00:10:20 2010
New Revision: 86342

Log:
Fixed unit test failure on Windows

Modified:
   python/branches/py3k/Lib/test/test_trace.py

Modified: python/branches/py3k/Lib/test/test_trace.py
==============================================================================
--- python/branches/py3k/Lib/test/test_trace.py	(original)
+++ python/branches/py3k/Lib/test/test_trace.py	Tue Nov  9 00:10:20 2010
@@ -339,14 +339,15 @@
 ### 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():


More information about the Python-checkins mailing list