Skip to content

test.support.requires_debug_ranges raise SkipTest not returning decorator when _testcapi doesn't exist #137194

@youknowone

Description

@youknowone

Bug report

Bug description:

@requires_debug_ranges()
class ...:

requires_debug_ranges here is expected to skip the decorated test. But when _testcapi doesn't exist, it raises unittest.SkipTest when calling the decorator.

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    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