Skip to content

Add Hypothesis Testing #13846

Open
Open
@thomasjpfan

Description

@thomasjpfan

It may be beneficial to add hypothesis testing to some of our tests. Hypothesis testing allows for us to verify mathematical properties such as commutativity:

from hypothesis import given
import hypothesis.strategies as st

@given(st.integers(), st.integers())
def test_ints_are_commutative(x, y):
    assert x + y == y + x

This allows the CI to look for edge cases for us. This would be useful testing metrics. https://hypothesis.readthedocs.io/en/latest/

Metadata

Metadata

Assignees

No one assigned

    Labels

    HardHard level of difficultymodule:test-suiteeverything related to our tests

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions