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
b7591d47
Commit
b7591d47
authored
Oct 04, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Also fix pickletester
parent
382e8b51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
Lib/test/pickletester.py
Lib/test/pickletester.py
+3
-3
No files found.
Lib/test/pickletester.py
View file @
b7591d47
...
...
@@ -19,7 +19,7 @@ from pickle import bytes_types
# kind of outer loop.
protocols
=
range
(
pickle
.
HIGHEST_PROTOCOL
+
1
)
character_size
=
4
if
sys
.
maxunicode
>
0xFFFF
else
2
ascii_char_size
=
1
# Return True if opcode code appears in the pickle, else False.
...
...
@@ -1235,7 +1235,7 @@ class BigmemPickleTests(unittest.TestCase):
# All protocols use 1-byte per printable ASCII character; we add another
# byte because the encoded form has to be copied into the internal buffer.
@
bigmemtest
(
size
=
_2G
,
memuse
=
2
+
characte
r_size
,
dry_run
=
False
)
@
bigmemtest
(
size
=
_2G
,
memuse
=
2
+
ascii_cha
r_size
,
dry_run
=
False
)
def
test_huge_str_32b
(
self
,
size
):
data
=
"abcd"
*
(
size
//
4
)
try
:
...
...
@@ -1252,7 +1252,7 @@ class BigmemPickleTests(unittest.TestCase):
# BINUNICODE (protocols 1, 2 and 3) cannot carry more than
# 2**32 - 1 bytes of utf-8 encoded unicode.
@
bigmemtest
(
size
=
_4G
,
memuse
=
1
+
characte
r_size
,
dry_run
=
False
)
@
bigmemtest
(
size
=
_4G
,
memuse
=
1
+
ascii_cha
r_size
,
dry_run
=
False
)
def
test_huge_str_64b
(
self
,
size
):
data
=
"a"
*
size
try
:
...
...
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