Skip to content

Check for existing breakpoints when asserting absent sys.gettrace #1518

@tkcranny

Description

@tkcranny

While developing a new strategy for hypothesis, I've run into the case where the code can't be debugged, at least by simply running pytest in a debugger. This is due to an assert in the conftest file:

if not IN_COVERAGE_TESTS:
@pytest.fixture(scope=u'function', autouse=True)
def validate_lack_of_trace_function():
assert sys.gettrace() is None

Personally I'm not sure on the meanings behind its existence and operation, but via a chat with @Zac-HD, it came up that if the (coverage) tests have a breakpoint, then they should allow the tests to proceed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    legibilitymake errors helpful and Hypothesis grokabletests/build/CIabout testing or deployment *of* Hypothesis

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions