]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #13930: fix a / to use os.sep so that the test works on Windows.
authorGregory P. Smith <greg@krypto.org>
Tue, 14 Feb 2012 00:24:46 +0000 (16:24 -0800)
committerGregory P. Smith <greg@krypto.org>
Tue, 14 Feb 2012 00:24:46 +0000 (16:24 -0800)
Lib/lib2to3/tests/test_main.py

index 407afa11d13be4564b8b1b92eca5ec1c8b79d79b..225c15de1889c43e078c8f23c01049f1eb8befa9 100644 (file)
@@ -94,8 +94,10 @@ class TestMain(unittest.TestCase):
             self.assertIn("Writing converted %s to %s" % (
                     os.path.join(self.py2_src_dir, name),
                     os.path.join(self.py3_dest_dir, name+suffix)), stderr)
-        self.assertRegexpMatches(stderr, r"No changes to .*/__init__\.py")
-        self.assertNotRegex(stderr, r"No changes to .*/trivial\.py")
+        self.assertRegex(
+                stderr, r"No changes to .*/__init__\.py".replace("/", os.sep))
+        self.assertNotRegex(
+                stderr, r"No changes to .*/trivial\.py".replace("/", os.sep))
 
     def test_filename_changing_on_output_two_files(self):
         """2to3 two files in one directory with a new output dir."""