diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-31 09:25:16 +0200 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2015-01-31 09:25:16 +0200 |
commit | d484605c10fe6d23dd0a3f5f631a0011fd1f2016 (patch) | |
tree | 4632fe54713c03d68b7b5fd1a9ac382c13b2695c /Lib/test/test_xpickle.py | |
parent | b84e5daf915296984d46f8fe44547e7bc2924700 (diff) | |
download | cpython-git-d484605c10fe6d23dd0a3f5f631a0011fd1f2016.tar.gz |
Restored test_xpickle compatibility with Python 2.5.
Python 2.5 has no unittest.skipUnless.
Diffstat (limited to 'Lib/test/test_xpickle.py')
-rw-r--r-- | Lib/test/test_xpickle.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/test_xpickle.py b/Lib/test/test_xpickle.py index b6973f62f7..95ad4eba77 100644 --- a/Lib/test/test_xpickle.py +++ b/Lib/test/test_xpickle.py @@ -158,8 +158,10 @@ class AbstractCompatTests(AbstractPickleTests): # This is a cut-down version of pickletester's test_unicode. Backwards # compatibility was explicitly broken in r67934 to fix a bug. - @unittest.skipUnless(test_support.have_unicode, 'no unicode support') 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'<\\>'] for proto in pickletester.protocols: for u in endcases: @@ -218,7 +220,7 @@ class CPicklePython27Compat(AbstractCompatTests): python = "python2.7" error = cPickle.BadPickleGet -class PicklePython27Compat(CPicklePython26Compat): +class PicklePython27Compat(CPicklePython27Compat): module = pickle error = KeyError |