Skip to content

Commit efd0858

Browse files
committed
Skip whole test_capi if _testcapi is not present
1 parent 45d59ba commit efd0858

File tree

3 files changed

+370
-461
lines changed

3 files changed

+370
-461
lines changed

Lib/test/test_capi/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import os
2-
from test.support import load_package_tests
2+
from test.support import import_helper, load_package_tests
3+
4+
# Do not run the whole directory, if `_testcapi` module is missing.
5+
# It is assumed that all tests in this directory rely on it.
6+
import_helper.import_module('_testcapi')
7+
38

49
def load_tests(*args):
510
return load_package_tests(os.path.dirname(__file__), *args)

0 commit comments

Comments
 (0)