Skip to content

v0.1.1 (insider only)

Latest
Compare
Choose a tag to compare
@15r10nk 15r10nk released this 07 Sep 06:10

This project integrates inline-snapshot into pandas testing utils like assert_frame_equal.

def test_assert_equal():
    df = DataFrame({"col0": [1, 2], "col1": [1, 5j], "col3": ["a", "b"]})

    # the second argument can be a snapshot
    assert_frame_equal(
        df,
        snapshot(
            DataFrame(
                [
                    {"col0": 1, "col1": (1   0j), "col3": "a"},
                    {"col0": 2, "col1": 5j, "col3": "b"},
                ]
            )
        ),
    )