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

mwh@users.sourceforge.net mwh at users.sourceforge.net
Fri Jun 3 15:56:01 CEST 2005


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25069
Modified Files:
	test_re.py 
Log Message:
M-x untabify
Index: test_re.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_re.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- test_re.py	2 Jun 2005 13:38:45 -0000	1.54
+++ test_re.py	3 Jun 2005 13:55:58 -0000	1.55
@@ -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

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