[Python-checkins] python/dist/src/Lib/test test_re.py, 1.53.2.1, 1.53.2.2
anthonybaxter@users.sourceforge.net
anthonybaxter at users.sourceforge.net
Fri Jun 3 16:02:51 CEST 2005
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28144
Modified Files:
Tag: release24-maint
test_re.py
Log Message:
fix exceptions.TabError. _Please_ run test suite before checking in.
Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.53.2.1
retrieving revision 1.53.2.2
diff -u -d -r1.53.2.1 -r1.53.2.2
--- test_re.py 2 Jun 2005 13:40:12 -0000 1.53.2.1
+++ test_re.py 3 Jun 2005 14:02:48 -0000 1.53.2.2
@@ -235,15 +235,15 @@
self.assertEqual(re.match('^(?:(a)|c)((?(1)|d))$', 'a').groups(),
('a', ''))
- # Tests for bug #1177831: exercise groups other than the first group
- p = re.compile('(?P<g1>a)(?P<g2>b)?((?(g2)c|d))')
- self.assertEqual(p.match('abc').groups(),
- ('a', 'b', 'c'))
- self.assertEqual(p.match('ad').groups(),
- ('a', None, 'd'))
- self.assertEqual(p.match('abd'), None)
- self.assertEqual(p.match('ac'), None)
-
+ # Tests for bug #1177831: exercise groups other than the first group
+ p = re.compile('(?P<g1>a)(?P<g2>b)?((?(g2)c|d))')
+ self.assertEqual(p.match('abc').groups(),
+ ('a', 'b', 'c'))
+ self.assertEqual(p.match('ad').groups(),
+ ('a', None, 'd'))
+ self.assertEqual(p.match('abd'), None)
+ self.assertEqual(p.match('ac'), None)
+
def test_re_groupref(self):
self.assertEqual(re.match(r'^(\|)?([^()]+)\1$', '|a|').groups(),
More information about the Python-checkins
mailing list