summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorAnthony Baxter <anthonybaxter@gmail.com>2005-06-03 14:02:48 (GMT)
committerAnthony Baxter <anthonybaxter@gmail.com>2005-06-03 14:02:48 (GMT)
commit90014d6db0bbfb634eefe673554e885283a1c344 (patch)
treead5fba95ca1b2b0e4a6c1ac16cedc0a4744b907e /Lib
parent175886b0912e2373d20d2f93cc8b59c39f4afad2 (diff)
downloadcpython-90014d6db0bbfb634eefe673554e885283a1c344.zip
cpython-90014d6db0bbfb634eefe673554e885283a1c344.tar.gz
cpython-90014d6db0bbfb634eefe673554e885283a1c344.tar.bz2
fix exceptions.TabError. _Please_ run test suite before checking in.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_re.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index c86f502..eab995d 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -235,15 +235,15 @@ class ReTests(unittest.TestCase):
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(),