Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
9560cbec
Commit
9560cbec
authored
May 23, 2012
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix pickle test in Python 3
parent
ded26a8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
tests/run/reduce_pickle.pyx
tests/run/reduce_pickle.pyx
+16
-6
No files found.
tests/run/reduce_pickle.pyx
View file @
9560cbec
import
sys
if
sys
.
version_info
[
0
]
<
3
:
__doc__
=
"""
>>> import cPickle
>>> a = A(5); a
A(5)
>>> cPickle.loads(cPickle.dumps(a))
A(5)
>>> b = B(0, 1); b
B(x=0, y=1)
>>> cPickle.loads(cPickle.dumps(b))
B(x=0, y=1)
"""
cdef
class
A
:
cdef
class
A
:
"""
"""
>>> a = A(3); a
>>> a = A(3); a
A(3)
A(3)
>>> import cPickle
>>> cPickle.loads(cPickle.dumps(a))
A(3)
>>> import pickle
>>> import pickle
>>> pickle.loads(pickle.dumps(a))
>>> pickle.loads(pickle.dumps(a))
A(3)
A(3)
...
@@ -25,9 +38,6 @@ cdef class B:
...
@@ -25,9 +38,6 @@ cdef class B:
"""
"""
>>> b = B(x=37, y=389); b
>>> b = B(x=37, y=389); b
B(x=37, y=389)
B(x=37, y=389)
>>> import cPickle
>>> cPickle.loads(cPickle.dumps(b))
B(x=37, y=389)
>>> import pickle
>>> import pickle
>>> pickle.loads(pickle.dumps(b))
>>> pickle.loads(pickle.dumps(b))
B(x=37, y=389)
B(x=37, y=389)
...
...
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