]> granicus.if.org Git - python/commitdiff
fall back when an old test_support doesn't have various data and functions (closes...
authorBenjamin Peterson <benjamin@python.org>
Sat, 30 Mar 2013 14:36:31 +0000 (10:36 -0400)
committerBenjamin Peterson <benjamin@python.org>
Sat, 30 Mar 2013 14:36:31 +0000 (10:36 -0400)
Lib/test/pickletester.py
Misc/NEWS

index 3e7e11da4d4d20f66a66dda7a47adb6221a321f9..c95531f33e6976cf159d04b6a0b880d09aff95b0 100644 (file)
@@ -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:
index adf78dea8761c2be66f8fe717a7948d3b4353ada..45873092c3763dbc5ad074195dfae49b1ecf8c08 100644 (file)
--- 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
 -------------