Skip to content

Add parameters into the test case  #57

Open
@enpuyou

Description

@enpuyou
def stfunc_both():
    return [st.integers(), st.integers()]
@given(*stfunc_both())
def test_add(a, b):
    assert add(a, b) == a + b

As shown above, hypothesis works by using @given to generate data and also pass in the data by adding parameters to the test case. For now, user can manually type in the parameters in test case, however, we could also do something so that it could be automatically added there. This can be related to the plugin.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestquestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions