Skip to main content

A pytest plugin for snapshot testing polars dataframes.

Project description

photoshoot

Photoshoot is a pytest plugin libary for making snapshot testing with Polars DataFrames easy.

Installation

pip install photoshoot

Usage

On the first run of this test, it will fail. Because no previous snapshot has been created.

import pytest
import polars as pl

def test_dataframe(local_snapshot):
    df = pl.DataFrame({
        "a": [1, 2, 3],
        "b": [4, 5, 6],
    })
    local_snapshot(df)

Running the test like this, will create a snapshot of the dataframe. All future runs will compare the dataframe with the snapshot.

pytest --new-snapshot

Rerunning the test now will pass, as the snapshot is already created.

Features

Currenty this library only supports Polars DataFrames, and only supports local snapshots or gcs snapshots.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

photoshoot-0.2.1.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

photoshoot-0.2.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file photoshoot-0.2.1.tar.gz.

File metadata

  • Download URL: photoshoot-0.2.1.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for photoshoot-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0416228c77fb546ffd7bcf6afad3df87e9cbf19423a835ac35896132cf812130
MD5 1b4dc8e44a3c20566e0455c2c427798d
BLAKE2b-256 d553459809cb2d7ab6f97e1fbcea1b68d8581ac1f70d447ad9aa445fab706722

See more details on using hashes here.

File details

Details for the file photoshoot-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: photoshoot-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for photoshoot-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a2ef2f269c5f8bf906baf1cdae8ae14eeae999affb48ee7ec3bda907f00344f0
MD5 3dad0f78978592b08bc56cef54695156
BLAKE2b-256 1ab857313b39e4110addc183c2bde27d236175736d05da05e56235bcb8f0f8bc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page