[Python-checkins] cpython (merge 3.2 -> default): Merge: #11873: Improve test regex so random directory names don't cause test to

r.david.murray python-checkins at python.org
Thu May 5 18:19:04 CEST 2011


http://hg.python.org/cpython/rev/83e069281810
changeset:   69854:83e069281810
parent:      69852:b06d7aa8ac20
parent:      69853:76bd26565cc7
user:        R David Murray <rdmurray at bitdance.com>
date:        Thu May 05 12:17:50 2011 -0400
summary:
  Merge: #11873: Improve test regex so random directory names don't cause test to fail

files:
  Lib/test/test_compileall.py |  2 +-
  Misc/NEWS                   |  3 +++
  2 files changed, 4 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_compileall.py b/Lib/test/test_compileall.py
--- a/Lib/test/test_compileall.py
+++ b/Lib/test/test_compileall.py
@@ -248,7 +248,7 @@
         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
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -561,6 +561,9 @@
 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 #11958: Fix FTP tests for IPv6, bind to "::1" instead of "localhost".
   Patch written by Charles-Francois Natali.
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list