summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2012-12-03 20:08:43 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2012-12-03 20:08:43 (GMT)
commit86067c2e17b221ac10c4b4c97030c2cfc44eccaf (patch)
treea87b15948fca1ee9f7424de1aaa6257dc83e4ad3
parent1f1888ec1e7c7d4e69084cda9425cf0a456e30c3 (diff)
downloadcpython-86067c2e17b221ac10c4b4c97030c2cfc44eccaf.zip
cpython-86067c2e17b221ac10c4b4c97030c2cfc44eccaf.tar.gz
cpython-86067c2e17b221ac10c4b4c97030c2cfc44eccaf.tar.bz2
Fix test splitting in previous commit.
-rw-r--r--Lib/test/test_re.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 96a6bce..0c8c676 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -863,6 +863,8 @@ class ReTests(unittest.TestCase):
s = 'a' * size
m = re.search('$', s)
self.assertIsNotNone(m)
+ self.assertEqual(m.start(), size)
+ self.assertEqual(m.end(), size)
# The huge memuse is because of re.sub() using a list and a join()
# to create the replacement result.
@@ -870,10 +872,6 @@ class ReTests(unittest.TestCase):
def test_large_subn(self, size):
# Issue #10182: indices were 32-bit-truncated.
s = 'a' * size
- m = re.search('$', s)
- self.assertIsNotNone(m)
- self.assertEqual(m.start(), size)
- self.assertEqual(m.end(), size)
r, n = re.subn('', '', s)
self.assertEqual(r, s)
self.assertEqual(n, size + 1)