Don't run xpickle tests when the reference interpreter doesn't have test_support

(see AMD64 Gentoo buildbot)
This commit is contained in:
Antoine Pitrou 2010-10-10 14:53:36 +00:00
parent 58dab67f2d
commit 739a59cf72
1 changed files with 3 additions and 2 deletions

View 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):