swuecho / snapshottest_ext

snapshottest pandas dataframe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

snapshottest_ext

extra formatter for snapshottest

Usage

# use with pytest
import pandas as pd
from snapshottest_ext.dataframe  import PandasSnapshot

def test_format(snapshot):
    df = pd.DataFrame([['a', 'b'], ['c', 'd']],
                      columns=['col 1', 'col 2'])
    snapshot.assert_match(PandasSnapshot(df))

About

snapshottest pandas dataframe


Languages

Language:Python 97.2%Language:Dockerfile 2.2%Language:Makefile 0.6%