summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_re.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-05-14 05:32:33 (GMT)
committerGitHub <noreply@github.com>2017-05-14 05:32:33 (GMT)
commit821a9d146bc04a1bc1a9807962990a1f59d692b8 (patch)
treee981ba61ef49d7bcd83474cefe76ee3f18a6dc3f /Lib/test/test_re.py
parentcbddf58c797f850a5b06f317a4bb7ab69c6e9715 (diff)
downloadcpython-821a9d146bc04a1bc1a9807962990a1f59d692b8.zip
cpython-821a9d146bc04a1bc1a9807962990a1f59d692b8.tar.gz
cpython-821a9d146bc04a1bc1a9807962990a1f59d692b8.tar.bz2
bpo-30340: Enhanced regular expressions optimization. (#1542)
This increased the performance of matching some patterns up to 25 times.
Diffstat (limited to 'Lib/test/test_re.py')
-rw-r--r--Lib/test/test_re.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py
index 4d71eea..5d36b54 100644
--- a/Lib/test/test_re.py
+++ b/Lib/test/test_re.py
@@ -1695,20 +1695,18 @@ class ReTests(unittest.TestCase):
dump = '''\
SUBPATTERN 1 0 0
LITERAL 46
-SUBPATTERN None 0 0
- BRANCH
- IN
- LITERAL 99
- LITERAL 104
- OR
- LITERAL 112
- LITERAL 121
-SUBPATTERN None 0 0
- GROUPREF_EXISTS 1
- AT AT_END
- ELSE
- LITERAL 58
- LITERAL 32
+BRANCH
+ IN
+ LITERAL 99
+ LITERAL 104
+OR
+ LITERAL 112
+ LITERAL 121
+GROUPREF_EXISTS 1
+ AT AT_END
+ELSE
+ LITERAL 58
+ LITERAL 32
'''
self.assertEqual(out.getvalue(), dump)
# Debug output is output again even a second time (bypassing