Programmatically accessing statistics

13 views
Skip to first unread message

Jens Troeger

unread,
Dec 28, 2022, 6:05:26 PM12/28/22
to Hypothesis users
Hello,

There’s a section Test statistics that Hypothesis may print after running. Is it possible to access the statistics of individual function runs programmatically? For example,

@given(foo=st.text())
def test_something(foo):
    assert foo

test_something()
# Get statistics here?

I ask because it would help to add a few meaningful asserts that would allow me to reason about the behavior of the function given various different examples of foo.

Thank you!
Jens
Reply all
Reply to author
Forward
0 new messages