From: R David Murray Date: Thu, 5 May 2011 15:52:44 +0000 (-0400) Subject: #11873: Improve test regex so random directory names don't cause test to fail X-Git-Tag: v3.2.1b1~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66a18fd801a87faa2079a2d7b66e8b1a8945b691;p=thirdparty%2FPython%2Fcpython.git #11873: Improve test regex so random directory names don't cause test to fail --- diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py index 250d31b42e41..c1dfdb376f2f 100644 --- a/Lib/test/test_compileall.py +++ b/Lib/test/test_compileall.py @@ -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) diff --git a/Misc/NEWS b/Misc/NEWS index 5fb153d5ecf9..4e0be321f994 100644 --- 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.