[Python-checkins] python/dist/src/Lib/test test_re.py,1.47,1.48
perky at users.sourceforge.net
perky at users.sourceforge.net
Tue Apr 20 17:30:27 EDT 2004
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29180/Lib/test
Modified Files:
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.47
retrieving revision 1.48
diff -C2 -d -r1.47 -r1.48
*** test_re.py 18 Jan 2004 20:29:55 -0000 1.47
--- test_re.py 20 Apr 2004 21:30:07 -0000 1.48
***************
*** 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