Skip to content

Breakpoint in hypothesis test is not hit #837

@tekumara

Description

@tekumara

In VS Code a breakpoint on the assert line will not be hit, eg:

from statistics import mean

from hypothesis import given
from hypothesis import strategies as st


@given(st.lists(st.floats(allow_nan=False, allow_infinity=False), min_size=1))
def test_mean(xs):
    print("test_mean")
    assert min(xs) <= mean(xs) <= max(xs)

Hypothesis: 6.26.1
Vscode: 1.64.0 (commit 5554b12acf27056905806867f251c859323ff7e9)
Debugpy: 1.5.1
Python: 3.9.7
Pytest: 6.2.5
OS: Darwin x64 21.3.0

See tekumara/hypothesis-debug-vscode for a full reproduction.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions