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
e45dac4e
Commit
e45dac4e
authored
Jan 21, 2013
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add bigmemtest decorator to test of issue #16335.
parent
3b40b712
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
11 deletions
+10
-11
Lib/test/test_ucn.py
Lib/test/test_ucn.py
+10
-11
No files found.
Lib/test/test_ucn.py
View file @
e45dac4e
...
@@ -144,18 +144,17 @@ class UnicodeNamesTest(unittest.TestCase):
...
@@ -144,18 +144,17 @@ class UnicodeNamesTest(unittest.TestCase):
@
unittest
.
skipUnless
(
_testcapi
.
INT_MAX
<
_testcapi
.
PY_SSIZE_T_MAX
,
@
unittest
.
skipUnless
(
_testcapi
.
INT_MAX
<
_testcapi
.
PY_SSIZE_T_MAX
,
"needs UINT_MAX < SIZE_MAX"
)
"needs UINT_MAX < SIZE_MAX"
)
def
test_issue16335
(
self
):
@
support
.
bigmemtest
(
size
=
_testcapi
.
UINT_MAX
+
1
,
memuse
=
1
+
4
//
len
(
'
\
U00010000
'
),
dry_run
=
False
)
def
test_issue16335
(
self
,
size
):
# very very long bogus character name
# very very long bogus character name
try
:
x
=
b'
\
\
N{SPACE'
+
b'x'
*
(
_testcapi
.
UINT_MAX
+
1
)
+
b'}'
x
=
b'
\
\
N{SPACE'
+
b'x'
*
(
_testcapi
.
UINT_MAX
+
1
)
+
b'}'
self
.
assertEqual
(
len
(
x
),
len
(
b'
\
\
N{SPACE}'
)
+
self
.
assertEqual
(
len
(
x
),
len
(
b'
\
\
N{SPACE}'
)
+
(
_testcapi
.
UINT_MAX
+
1
))
(
_testcapi
.
UINT_MAX
+
1
))
self
.
assertRaisesRegex
(
UnicodeError
,
self
.
assertRaisesRegex
(
UnicodeError
,
'unknown Unicode character name'
,
'unknown Unicode character name'
,
x
.
decode
,
'unicode-escape'
x
.
decode
,
'unicode-escape'
)
)
except
MemoryError
:
raise
unittest
.
SkipTest
(
"not enough memory"
)
def
test_main
():
def
test_main
():
...
...
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