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
b33941ab
Commit
b33941ab
authored
Dec 03, 2012
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Plain Diff
Split the bigmem re test in two separate tests with different memory requirements.
parents
e8544336
1f1888ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
Lib/test/test_re.py
Lib/test/test_re.py
+9
-2
No files found.
Lib/test/test_re.py
View file @
b33941ab
...
@@ -949,10 +949,17 @@ class ReTests(unittest.TestCase):
...
@@ -949,10 +949,17 @@ class ReTests(unittest.TestCase):
# Test behaviour when not given a string or pattern as parameter
# Test behaviour when not given a string or pattern as parameter
self.assertRaises(TypeError, re.compile, 0)
self.assertRaises(TypeError, re.compile, 0)
@bigmemtest(size=_2G, memuse=1)
def test_large_search(self, size):
# Issue #10182: indices were 32-bit-truncated.
s = 'a' * size
m = re.search('$', s)
self.assertIsNotNone(m)
# The huge memuse is because of re.sub() using a list and a join()
# The huge memuse is because of re.sub() using a list and a join()
# to create the replacement result.
# to create the replacement result.
@bigmemtest(size=_2G, memuse=
20
)
@bigmemtest(size=_2G, memuse=
16 + 2
)
def test_large(self, size):
def test_large
_subn
(self, size):
# Issue #10182: indices were 32-bit-truncated.
# Issue #10182: indices were 32-bit-truncated.
s = 'a' * size
s = 'a' * size
m = re.search('$', s)
m = re.search('$', s)
...
...
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