Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c2ed621

Browse files
author
Fredrik Lundh
committed
-- SRE 0.9.8: updated test scripts
1 parent a4e9a33 commit c2ed621

3 files changed

Lines changed: 6 additions & 21 deletions

File tree

Lib/test/output/test_re

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1 @@
11
test_re
2-
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
3-
=== Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
4-
=== Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
5-
=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
6-
=== Fails on case-insensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
7-
=== Fails on locale-sensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
8-
=== grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None'
9-
=== grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None'
10-
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
11-
=== Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
12-
=== Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')

Lib/test/output/test_sre

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1 @@
11
test_sre
2-
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
3-
=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
4-
=== grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None'
5-
=== grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None'
6-
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')

Lib/test/test_sre.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -152,9 +152,10 @@ def bump_num(matchobj):
152152
assert sre.split("(?::*)", ":a:b::c") == ['', 'a', 'b', 'c']
153153
assert sre.split("(:)*", ":a:b::c") == ['', ':', 'a', ':', 'b', ':', 'c']
154154
assert sre.split("([b:]+)", ":a:b::c") == ['', ':', 'a', ':b::', 'c']
155-
# FIXME: group problem
156-
# assert sre.split("(b)|(:+)", ":a:b::c") == \
157-
# ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
155+
## print sre.split("(b)|(:+)", ":a:b::c")
156+
## print ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
157+
## assert sre.split("(b)|(:+)", ":a:b::c") == \
158+
## ['', None, ':', 'a', None, ':', '', 'b', None, '', None, '::', 'c']
158159
assert sre.split("(?:b)|(?::+)", ":a:b::c") == ['', 'a', '', '', 'c']
159160
except AssertionError:
160161
raise TestFailed, "sre.split"
@@ -377,8 +378,8 @@ def bump_num(matchobj):
377378
if result==None:
378379
print '=== Fails on locale-sensitive match', t
379380

380-
# Try the match with UNICODE enabled, and check that it
381-
# still succeeds.
381+
# Try the match with UNICODE locale enabled, and check
382+
# that it still succeeds.
382383
obj=sre.compile(pattern, sre.UNICODE)
383384
result=obj.search(s)
384385
if result==None:

0 commit comments

Comments
 (0)