Cheuk Ting Ho
@cheukting_ho@fosstodon
Cheukting
https://cheuk.dev
@cheuktingho
Grab this slides: slides.com/cheukting_ho/hypothesis-dataframe
GH repo: github.com/Cheukting/hypothesis-dataframe
import pytest @pytest.mark.parametrize("s", ["", "something", "12345"]) def test_decode_inverts_encode(s): assert decode(encode(s)) == s
from hypothesis import given from hypothesis.strategies import text @given(text()) def test_decode_inverts_encode(s): assert decode(encode(s)) == s
Details: https://hypothesis.readthedocs.io/en/latest/quickstart.html
entry point to modify the test
generating test data
https://hypothesis.readthedocs.io/en/latest/data.html
https://hypothesis.readthedocs.io/en/latest/numpy.html
By Cheuk Ting Ho
Developer advocate / Data Scientist - support open-source and building the community.