`_testinternalcapi` is imported without guards in some test modules · Issue #109721 · python/cpython · GitHub
Skip to content

_testinternalcapi is imported without guards in some test modules #109721

Description

@sobolevn

Bug report

I found at least three cases where _testinternalcapi is just imported, we cannot do that, because other python implementation which reuse our test cases will fail on this.

  1. import _testinternalcapi

There can be several options to solve this:

  1. Use import _testinternalcapi with except ImportError, when some places might need it
  2. Use import_helper.import_module to skip some tests where this module is required
  3. Use @cpython_only decorator

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions