question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

hypothesis tests do not work anymore

See original GitHub issue

As already noted in #69 the hypothesis integration is broken currently.

I tracked it down and believe the cause lays in the way assertions are rewritten. Because here in rewrite.py the code object is only the body of the function all associated functionality by @hypothesis.given is lost. I assume this will be the same for all decorators that don’t directly return the function itself.

This can be reproduced with

from ward import test
from hypothesis import given, strategies


@test("hypothesis example")
@given(a=strategies.integers())
def _(a):
    assert isinstance(a, int)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
MrGreenTeacommented, Mar 23, 2021

Yeah makes sense. Sadly I was very busy with my bachelor thesis but want to start contributing to ward in the next weeks 😃

1reaction
darrenburnscommented, Nov 24, 2020

Thanks for the report. I should remove the Hypothesis integration stuff from the docs. That functionality isn’t included in test coverage and so shouldn’t be advertised as a feature.

I’m also open to pull requests to fix the integration and add test coverage around it. It’s a nice-to-have but I have very little time to work myself at the moment.

Read more comments on GitHub >

github_iconTop Results From Across the Web

When Null Hypothesis Significance Testing Is Unsuitable for ...
We review these shortcomings and suggest that, after sustained negative experience, NHST should no longer be the default, dominant statistical ...
Read more >
Planned Hypothesis Tests Are Not Necessarily Exempt ... - ERIC
Scientific research often involves testing more than one hypothesis at a time, which can inflate the probability that a Type I error (false...
Read more >
9 Hypothesis Tests
The objective of hypothesis testing is to decide, based on sample information, if the alternative hypotheses is actually supported by the data. We...
Read more >
Everything You Need To Know about Hypothesis Testing
Ideally, a hypothesis test fails to reject the null hypothesis when the effect is not present in the population, and it rejects the...
Read more >
S.3 Hypothesis Testing | STAT ONLINE
In reviewing hypothesis tests, we start first with the general idea. ... If it is likely, then the researcher does not reject his...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found