Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supporting Hypothesis tests #253

Open
darrenburns opened this issue Jun 5, 2021 · 2 comments
Open

Supporting Hypothesis tests #253

darrenburns opened this issue Jun 5, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@darrenburns
Copy link
Owner

I'd like to re-examine this. It was an early goal of Ward that was dropped. It's actually the reason the @using decorator exists!

Ideally we could write tests like:

@given(text())
@using(fix=some_fixture)  # this already exists
@test("the test description")
def _(some_text, fix):
    ...

or perhaps the following, if possible...

@using(some_text=text(), fix=some_fixture) 
@test("the test description")
def _(some_text, fix):
    ...

Examining the code here could be useful: https://github.com/HypothesisWorks/hypothesis/blob/master/hypothesis-python/src/hypothesis/extra/pytestplugin.py#L139

@darrenburns darrenburns added the enhancement New feature or request label Jun 5, 2021
@taybenlor
Copy link

I would be keen on having this. I really like the way ward does parameterized testing and would like to combine that with hypothesis.

@astrogewgaw
Copy link

astrogewgaw commented Oct 9, 2022

@darrenburns Are there any updates on this? I was thinking of using ward and hypothesis for testing one of my own packages, and saw that this issue is still open. It would be really nice to have support for this 😁 ! PS: The code for hypothesis's pytest plugin has moved here, if anyone wants to have a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants