[Python-checkins] python/dist/src/Lib/test test_re.py,1.55,1.56

niemeyer@users.sourceforge.net niemeyer at users.sourceforge.net
Wed Sep 14 10:54:42 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21345/Lib/test
Modified Files:
	test_re.py 
Log Message:
Bug #1202493: Fixing SRE parser to handle '{}' as perl does, rather than
considering it exactly like a '*'.
Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- test_re.py	3 Jun 2005 13:55:58 -0000	1.55
+++ test_re.py	14 Sep 2005 08:54:39 -0000	1.56
@@ -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

AltStyle によって変換されたページ (->オリジナル) /