Commit b2256729 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add sre_compile_test.expected

Ie, manually specify the reference output for sre_compile_test.py instead
of running CPython to generate it.  CPython changed the behavior (and interface)
of _optimize_charset at some point between 2.7.7 (where we copied from) and
2.7.9.

We should probably copy their new implementation (seems to have a few more
optimizations), but for now this should fix #707.
parent b0db3e65
None
None
('b',)
0
10000
20000
30000
40000
50000
60000
70000
80000
90000
[('bigcharset', [2, 16843008L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 16843009L, 0L, 0L, 0L, 0L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L, 4294967295L])]
......@@ -15,4 +15,7 @@ def identity(o):
charset = [(sre_constants.RANGE, (128, 65535))]
# Note: _optimize_charset changed behavior + interface some time
# between 2.7.7 (our stdlib) and 2.7.9 (current cpython latest),
# so this test has a .expected file to avoid running cpython.
print sre_compile._optimize_charset(charset, identity)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment