[Zope3-checkins] SVN: zope.testing/trunk/src/zope/testing/testrunner.py ``identifier`` regexp:

Tim Peters tim.one at comcast.net
Tue Sep 27 16:12:33 EDT 2005


Log message for revision 38655:
  ``identifier`` regexp:
  
  1. Simplified.
  
  2. Changed to match identifiers.  The way it was written it
     required at least two characters (so, e.g., would not
     match "a" or "X").  If that wasn't a bug, sorry, but
     then there should have been a comment explaining why.  As
     is, it looked plainly wrong.
  

Changed:
  U   zope.testing/trunk/src/zope/testing/testrunner.py

-=-
Modified: zope.testing/trunk/src/zope/testing/testrunner.py
===================================================================
--- zope.testing/trunk/src/zope/testing/testrunner.py	2005-09-27 19:44:36 UTC (rev 38654)
+++ zope.testing/trunk/src/zope/testing/testrunner.py	2005-09-27 20:12:33 UTC (rev 38655)
@@ -744,7 +744,7 @@
                     yield f
                     break
 
-identifier = re.compile('^[_a-zA-Z][_a-zA-Z0-9]+$').match
+identifier = re.compile(r'[_a-zA-Z]\w*$').match
 def find_test_files_(options):
     tests_pattern = options.tests_pattern
     test_file_pattern = options.test_file_pattern



More information about the Zope3-Checkins mailing list