Skip to content

Lib/test/test_capi/test_getargs.py raises NameError when _testinternalcapi is not importable #149403

@sobolevn

Description

@sobolevn

Bug report

See this code:

try:
import _testinternalcapi
except ImportError:
_testinternalcapi = NULL

But, NULL = None is only set multiple lines below:

All versions starting from 3.13 are affected.
I have a PR ready.

Linked PRs

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