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
4874e27d
Commit
4874e27d
authored
Jan 31, 2015
by
Serhiy Storchaka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restored test_xpickle compatibility with Python 2.5.
Python 2.5 has no unittest.skipUnless.
parent
50073e22
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
Lib/test/test_xpickle.py
Lib/test/test_xpickle.py
+4
-2
No files found.
Lib/test/test_xpickle.py
View file @
4874e27d
...
@@ -158,8 +158,10 @@ class AbstractCompatTests(AbstractPickleTests):
...
@@ -158,8 +158,10 @@ class AbstractCompatTests(AbstractPickleTests):
# This is a cut-down version of pickletester's test_unicode. Backwards
# This is a cut-down version of pickletester's test_unicode. Backwards
# compatibility was explicitly broken in r67934 to fix a bug.
# compatibility was explicitly broken in r67934 to fix a bug.
@
unittest
.
skipUnless
(
test_support
.
have_unicode
,
'no unicode support'
)
def
test_unicode
(
self
):
def
test_unicode
(
self
):
if
not
test_support
.
have_unicode
:
# Python 2.5 has no unittest.skipUnless
self
.
skipTest
(
'no unicode support'
)
endcases
=
[
u''
,
u'<
\
\
u>'
,
u'<
\
\
%c>'
%
0x1234
,
u'<
\
n
>'
,
u'<
\
\
>'
]
endcases
=
[
u''
,
u'<
\
\
u>'
,
u'<
\
\
%c>'
%
0x1234
,
u'<
\
n
>'
,
u'<
\
\
>'
]
for
proto
in
pickletester
.
protocols
:
for
proto
in
pickletester
.
protocols
:
for
u
in
endcases
:
for
u
in
endcases
:
...
@@ -218,7 +220,7 @@ class CPicklePython27Compat(AbstractCompatTests):
...
@@ -218,7 +220,7 @@ class CPicklePython27Compat(AbstractCompatTests):
python
=
"python2.7"
python
=
"python2.7"
error
=
cPickle
.
BadPickleGet
error
=
cPickle
.
BadPickleGet
class
PicklePython27Compat
(
CPicklePython2
6
Compat
):
class
PicklePython27Compat
(
CPicklePython2
7
Compat
):
module
=
pickle
module
=
pickle
error
=
KeyError
error
=
KeyError
...
...
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