[Python-checkins] python/dist/src/Lib/test test_re.py, 1.45.6.2, 1.45.6.3

perky at users.sourceforge.net perky at users.sourceforge.net
Tue Apr 20 17:32:38 EDT 2004


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30092/Lib/test

Modified Files:
      Tag: release23-maint
	test_re.py 
Log Message:
SF #926075: Fixed the bug that returns a wrong pattern object for
a string or unicode object in sre.compile() when a different type
pattern with the same value exists.


Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.45.6.2
retrieving revision 1.45.6.3
diff -C2 -d -r1.45.6.2 -r1.45.6.3
*** test_re.py	22 Nov 2003 03:25:40 -0000	1.45.6.2
--- test_re.py	20 Apr 2004 21:32:33 -0000	1.45.6.3
***************
*** 490,493 ****
--- 490,501 ----
                           [":", "::", ":::"])
  
+     def test_bug_926075(self):
+         try:
+             unicode
+         except NameError:
+             return # no problem if we have no unicode
+         self.assert_(re.compile('bug_926075') is not
+                      re.compile(eval("u'bug_926075'")))
+ 
  def run_re_tests():
      from test.re_tests import benchmarks, tests, SUCCEED, FAIL, SYNTAX_ERROR




More information about the Python-checkins mailing list