Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
61cd0076
Commit
61cd0076
authored
Aug 01, 2000
by
Fredrik Lundh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
-- SRE 0.9.8: updated test scripts
parent
e67f99e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
21 deletions
+6
-21
Lib/test/output/test_re
Lib/test/output/test_re
+0
-11
Lib/test/output/test_sre
Lib/test/output/test_sre
+0
-5
Lib/test/test_sre.py
Lib/test/test_sre.py
+6
-5
No files found.
Lib/test/output/test_re
View file @
61cd0076
test_re
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== Fails on case-insensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== Fails on locale-sensitive match ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None'
=== grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None'
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Fails on case-insensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Fails on locale-sensitive match ('^(.+)?B', 'AB', 0, 'g1', 'A')
Lib/test/output/test_sre
View file @
61cd0076
test_sre
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
=== Failed incorrectly ('(a+)+\\1', 'aa', 0, 'found+"-"+g1', 'aa-a')
=== grouping error ('(a)(b)c|ab', 'ab', 0, 'found+"-"+g1+"-"+g2', 'ab-None-None') 'ab-None-b' should be 'ab-None-None'
=== grouping error ('(a)+b|aac', 'aac', 0, 'found+"-"+g1', 'aac-None') 'aac-a' should be 'aac-None'
=== Failed incorrectly ('^(.+)?B', 'AB', 0, 'g1', 'A')
Lib/test/test_sre.py
View file @
61cd0076
...
...
@@ -152,9 +152,10 @@ try:
assert sre.split("(?::*)", ":a:b::c") == ['', '
a
', 'b', '
c
']
assert sre.split("(:)*", ":a:b::c") == ['', '
:
', '
a
', '
:
', 'b', '
:
', '
c
']
assert sre.split("([b:]+)", ":a:b::c") == ['', '
:
', '
a
', '
:
b
::
', '
c
']
# FIXME: group problem
# assert sre.split("(b)|(:+)", ":a:b::c") ==
\
# ['', None, '
:
', '
a
', None, '
:
', '', 'b', None, '', None, '
::
', '
c
']
## print sre.split("(b)|(:+)", ":a:b::c")
## print ['', None, '
:
', '
a
', None, '
:
', '', 'b', None, '', None, '
::
', '
c
']
## assert sre.split("(b)|(:+)", ":a:b::c") ==
\
## ['', None, '
:
', '
a
', None, '
:
', '', 'b', None, '', None, '
::
', '
c
']
assert sre.split("(?:b)|(?::+)", ":a:b::c") == ['', '
a
', '', '', '
c
']
except AssertionError:
raise TestFailed, "sre.split"
...
...
@@ -377,8 +378,8 @@ for t in tests:
if
result
==
None
:
print
'=== Fails on locale-sensitive match'
,
t
# Try the match with UNICODE
enabled, and check that it
# still succeeds.
# Try the match with UNICODE
locale enabled, and check
#
that it
still succeeds.
obj
=
sre
.
compile
(
pattern
,
sre
.
UNICODE
)
result
=
obj
.
search
(
s
)
if
result
==
None
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment