Skip to content

test_dict and test_abstract of test_capi unconditionally import _testcapi module #110529

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
sobolevn opened this issue Oct 8, 2023 · 0 comments
Assignees
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Oct 8, 2023

Bug report

All other tests guard this import with import_helper.import_module('_testcapi') (or something else). Example:

from test.support import catch_unraisable_exception, import_helper
# Skip this test if the _testcapi module isn't available.
_testcapi = import_helper.import_module('_testcapi')

Because some other Python implementations might not have this module.

I think that we should always check that _testcapi might be missing.
I have a PR ready.

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error tests Tests in the Lib/test dir labels Oct 8, 2023
@sobolevn sobolevn self-assigned this Oct 8, 2023
sobolevn added a commit to sobolevn/cpython that referenced this issue Oct 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

1 participant