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

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


http://hg.python.org/cpython/rev/76bd26565cc7
changeset:   69853:76bd26565cc7
branch:      3.2
parent:      69851:9b76edfddc54
user:        R David Murray <rdmurray at bitdance.com>
date:        Thu May 05 11:52:44 2011 -0400
summary:
  #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
@@ -322,6 +322,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 #10914: Add a minimal embedding test to test_capi.
 
 - Issue #11790: Fix sporadic failures in test_multiprocessing.WithProcessesTestCondition.

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


More information about the Python-checkins mailing list