[Python-checkins] python/dist/src/Lib/test test_re.py, 1.53.2.2, 1.53.2.3

birkenfeld@users.sourceforge.net birkenfeld at users.sourceforge.net
Sun Sep 18 15:03:20 CEST 2005


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

Modified Files:
      Tag: release24-maint
	test_re.py 
Log Message:
Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
considering it exactly like a '*'.

Backport from 2.5 branch.



Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.53.2.2
retrieving revision 1.53.2.3
diff -u -d -r1.53.2.2 -r1.53.2.3
--- test_re.py	3 Jun 2005 14:02:48 -0000	1.53.2.2
+++ test_re.py	18 Sep 2005 13:03:16 -0000	1.53.2.3
@@ -297,6 +297,9 @@
         self.assertNotEqual(re.match("^x{1,4}?$", "xxx"), None)
         self.assertNotEqual(re.match("^x{3,4}?$", "xxx"), None)
 
+        self.assertEqual(re.match("^x{}$", "xxx"), None)
+        self.assertNotEqual(re.match("^x{}$", "x{}"), None)
+
     def test_getattr(self):
         self.assertEqual(re.match("(a)", "a").pos, 0)
         self.assertEqual(re.match("(a)", "a").endpos, 1)



More information about the Python-checkins mailing list