[pypy-commit] pypy default: skip when _testcapi ImportErrors (like the other cpyext skips) which is less
pjenvey
noreply at buildbot.pypy.org
Sun May 19 22:20:31 CEST 2013
Author: Philip Jenvey <pjenvey at underboss.org>
Branch:
Changeset: r64350:2b05ce699b09
Date: 2013-05-19 13:17 -0700
http://bitbucket.org/pypy/pypy/changeset/2b05ce699b09/
Log: skip when _testcapi ImportErrors (like the other cpyext skips) which
is less pypy-specific
diff --git a/lib-python/2.7/test/test_sysconfig.py b/lib-python/2.7/test/test_sysconfig.py
--- a/lib-python/2.7/test/test_sysconfig.py
+++ b/lib-python/2.7/test/test_sysconfig.py
@@ -8,7 +8,7 @@
from copy import copy, deepcopy
from test.test_support import (run_unittest, TESTFN, unlink, get_attribute,
- check_impl_detail)
+ import_module)
import sysconfig
from sysconfig import (get_paths, get_platform, get_config_vars,
@@ -236,13 +236,11 @@
# XXX more platforms to tests here
def test_get_config_h_filename(self):
- if check_impl_detail(pypy=True):
- try:
- import cpyext
- except ImportError:
- self.skipTest("This test depends on cpyext.")
config_h = sysconfig.get_config_h_filename()
- self.assertTrue(os.path.isfile(config_h), config_h)
+ # import_module skips the test when the CPython C Extension API
+ # appears to not be supported
+ self.assertTrue(os.path.isfile(config_h) or
+ not import_module('_testcapi'), config_h)
def test_get_scheme_names(self):
wanted = ('nt', 'nt_user', 'os2', 'os2_home', 'osx_framework_user',
More information about the pypy-commit
mailing list