summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2013-03-30 10:36:31 -0400
committerBenjamin Peterson <benjamin@python.org>2013-03-30 10:36:31 -0400
commitd627e122d79802c3f91d6157af6af34d6f6a1757 (patch)
tree61f338b19edc9b46485b122d9495af3924dbc9ac
parent0861b13c981b93364db8a5bc184840acd4805497 (diff)
downloadcpython-git-d627e122d79802c3f91d6157af6af34d6f6a1757.tar.gz
fall back when an old test_support doesn't have various data and functions (closes #17533)
-rw-r--r--Lib/test/pickletester.py10
-rw-r--r--Misc/NEWS2
2 files changed, 10 insertions, 2 deletions
diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py
index 3e7e11da4d..c95531f33e 100644
--- a/Lib/test/pickletester.py
+++ b/Lib/test/pickletester.py
@@ -6,8 +6,14 @@ import cStringIO
import pickletools
import copy_reg
-from test.test_support import (TestFailed, have_unicode, TESTFN, _2G, _1M,
- precisionbigmemtest)
+from test.test_support import TestFailed, verbose, have_unicode, TESTFN
+try:
+ from test.test_support import _2G, _1M, precisionbigmemtest
+except ImportError:
+ # this import might fail when run on older Python versions by test_xpickle
+ _2G = _1G = 0
+ def precisionbigmemtest(*args, **kwargs):
+ return lambda self: None
# Tests that try a number of pickle protocols should have a
# for proto in protocols:
diff --git a/Misc/NEWS b/Misc/NEWS
index adf78dea87..45873092c3 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -24,6 +24,8 @@ Library
- Issue #17531: Fix tests that thought group and user ids were always the int
type. Also, always allow -1 as a valid group and user id.
+- Issue #17533: Fix test_xpickle with older versions of Python 2.5.
+
Documentation
-------------