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
015415ed
Commit
015415ed
authored
Mar 22, 2001
by
Fredrik Lundh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SRE 2.1b2: increase the chances that the sre test works on other
machines...
parent
816e149c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
14 deletions
+3
-14
Lib/test/output/test_sre
Lib/test/output/test_sre
+0
-8
Lib/test/test_sre.py
Lib/test/test_sre.py
+3
-6
No files found.
Lib/test/output/test_sre
View file @
015415ed
test_sre
sre.match(r'(x)*?y', 50000*'x'+'y').span() FAILED
Traceback (most recent call last):
File "../lib/test\test_sre.py", line 18, in test
r = eval(expression)
File "<string>", line 0, in ?
File "c:\pythonware\py21\python-2.1\lib\sre.py", line 52, in match
return _compile(pattern, flags).match(string)
RuntimeError: maximum recursion limit exceeded
Lib/test/test_sre.py
View file @
015415ed
...
...
@@ -243,12 +243,9 @@ if verbose:
# Try nasty case that overflows the straightforward recursive
# implementation of repeated groups.
test
(
r"""sre.match(r'(x)*', 50000*'x').span()"""
,
(
0
,
50000
),
RuntimeError
)
test
(
r"""sre.match(r'(x)*y', 50000*'x'+'y').span()"""
,
(
0
,
50001
),
RuntimeError
)
test
(
r"""sre.match(r'(x)*?y', 50000*'x'+'y').span()"""
,
(
0
,
50001
))
# this works in 2.1
test
(
"sre.match('(x)*', 50000*'x').span()"
,
(
0
,
50000
),
RuntimeError
)
test
(
"sre.match(r'(x)*y', 50000*'x'+'y').span()"
,
(
0
,
50001
),
RuntimeError
)
test
(
"sre.match(r'(x)*?y', 50000*'x'+'y').span()"
,
(
0
,
50001
),
RuntimeError
)
from
re_tests
import
*
...
...
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