]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
#11873: Improve test regex so random directory names don't cause test to fail
authorR David Murray <rdmurray@bitdance.com>
Thu, 5 May 2011 15:52:44 +0000 (11:52 -0400)
committerR David Murray <rdmurray@bitdance.com>
Thu, 5 May 2011 15:52:44 +0000 (11:52 -0400)
Lib/test/test_compileall.py
Misc/NEWS

index 250d31b42e411ede28f9c47125099db625a09790..c1dfdb376f2f722f7ca1c550bace1c0a743c39d1 100644 (file)
@@ -248,7 +248,7 @@ class CommandLineTests(unittest.TestCase):
         self.assertEqual(b'', quiet)
 
     def test_regexp(self):
-        self.assertRunOK('-q', '-x', 'ba.*', self.pkgdir)
+        self.assertRunOK('-q', '-x', 'ba[^\/]*$', self.pkgdir)
         self.assertNotCompiled(self.barfn)
         self.assertCompiled(self.initfn)
 
index 5fb153d5ecf9727abcdf8594fac6ad2f76149e85..4e0be321f994532743d7a86df3e8a51949e8957e 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -322,6 +322,9 @@ Extensions
 Tests
 -----
 
+- Issue #11873: Change regex in test_compileall to fix occasional failures when
+  when the randomly generated temporary path happened to match the regex.
+
 - Issue #10914: Add a minimal embedding test to test_capi.
 
 - Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition.