]> granicus.if.org Git - python/commitdiff
Don't run xpickle tests when the reference interpreter doesn't have test_support
authorAntoine Pitrou <solipsis@pitrou.net>
Sun, 10 Oct 2010 14:53:36 +0000 (14:53 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Sun, 10 Oct 2010 14:53:36 +0000 (14:53 +0000)
(see AMD64 Gentoo buildbot)

Lib/test/test_xpickle.py

index f41c97adce32febf6e34ead819eb73276bbb3ea1..2ce1dcbb24e6bc106459d0ae000817aa7877b670 100644 (file)
@@ -57,7 +57,8 @@ class DumpPickle_LoadCPickle(AbstractPickleTests):
         return cPickle.loads(buf)
 
 def have_python_version(name):
-    """Check whether the given name is a valid Python binary.
+    """Check whether the given name is a valid Python binary and has
+    test.test_support.
 
     This respects your PATH.
 
@@ -67,7 +68,7 @@ def have_python_version(name):
     Returns:
         True if the name is valid, False otherwise.
     """
-    return os.system(name + " -c 'import sys; sys.exit()'") == 0
+    return os.system(name + " -c 'import test.test_support'") == 0
 
 
 class AbstractCompatTests(AbstractPickleTests):