Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Lib/test/test_capi/test_abstract.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import unittest
from collections import OrderedDict
import _testcapi
from test.support import import_helper

_testcapi = import_helper.import_module('_testcapi')

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that such check should be done in Lib/test/test_capi/__init__.py. I don't think that it's worth to attempt to run any of sub-tests if _testcapi cannot be imported.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't agree that it should only be done there, because people can run only a single test file. In case of ./python.exe Lib/test/test_capi/test_WHATEVER.py, this test must also be skipped correctly.

However, I think that we can also check this in test_capi/__init__.py just to speed up test runs without _testcapi



NULL = None
Expand Down
4 changes: 3 additions & 1 deletion Lib/test/test_capi/test_dict.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import unittest
from collections import OrderedDict, UserDict
from types import MappingProxyType
import _testcapi
from test.support import import_helper

_testcapi = import_helper.import_module('_testcapi')


NULL = None
Expand Down
Loading