Skip to main content

No project description provided

Project description

PySnapTest

pysnaptest is a Python wrapper for the powerful Insta library written in Rust. It brings the simplicity and performance of snapshot testing from Rust to Python, enabling developers to quickly and easily test complex outputs, including strings, JSON, and other serializable data.

Snapshot testing helps ensure that your code produces consistent outputs as you make changes. By capturing the output of your code and comparing it to a stored "snapshot," you can detect unintended changes with ease.

Features

  • Fast and Lightweight: Leverages Rust's high performance through the Insta library.
  • Simple Integration: Easy-to-use Python API for snapshot testing.
  • Human-Readable Snapshots: Snapshots are stored in a clean, readable format.
  • Flexible Matchers: Supports testing strings, JSON, and other data structures.
  • Automatic Snapshot Updates: Conveniently update snapshots when intended changes are made.
  • CI-Friendly: Great for continuous integration workflows.

Installation

You can install pysnaptest via pip:

pip install pysnaptest

Updating Snapshots

If the output changes intentionally, you can review and update snapshots using the cargo-insta review command. This provides an interactive workflow to inspect changes and accept or reject updates.

Running Snapshot Review

You can install cargo-insta binaries from cargo-insta. After that you should be able to review snapshots with the following:

cargo-insta review

This command allows you to inspect differences and choose which snapshots to update.

Examples

To help you get started, we’ve included a collection of examples in the examples folder. These examples demonstrate how to use pysnaptest in projects and cover common use cases like snapshotting strings, JSON, and other data structures.

To try them out:

cd examples/my_project
pytest

Feel free to explore, modify, and build upon these examples for your own projects!

Contributing

We welcome contributions to pysnaptest! To get started:

  1. Fork the repository.
  2. Create a new branch for your feature or fix.
  3. Submit a pull request with a clear description of your changes.

License

pysnaptest is licensed under the Apache License, Version 2.0. See the LICENSE file for details.

Acknowledgments

This library is inspired by and built upon the excellent Insta library. A big thank you to the Insta team for creating such a fantastic tool!

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

pysnaptest-0.1.3.tar.gz (13.4 kB view details)

Uploaded Source

Built Distributions

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

pysnaptest-0.1.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (657.4 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

pysnaptest-0.1.3-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl (696.6 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ i686

pysnaptest-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (655.2 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

pysnaptest-0.1.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl (692.7 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ i686

pysnaptest-0.1.3-cp312-cp312-win_amd64.whl (512.7 kB view details)

Uploaded CPython 3.12Windows x86-64

pysnaptest-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (655.1 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

pysnaptest-0.1.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl (692.4 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ i686

pysnaptest-0.1.3-cp311-cp311-win_amd64.whl (513.2 kB view details)

Uploaded CPython 3.11Windows x86-64

pysnaptest-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (656.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

pysnaptest-0.1.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl (695.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ i686

pysnaptest-0.1.3-cp310-cp310-win_amd64.whl (513.2 kB view details)

Uploaded CPython 3.10Windows x86-64

pysnaptest-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (656.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

pysnaptest-0.1.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl (695.9 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ i686

pysnaptest-0.1.3-cp39-cp39-win_amd64.whl (513.1 kB view details)

Uploaded CPython 3.9Windows x86-64

pysnaptest-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (657.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

pysnaptest-0.1.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl (695.6 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ i686

pysnaptest-0.1.3-cp38-cp38-win_amd64.whl (513.2 kB view details)

Uploaded CPython 3.8Windows x86-64

pysnaptest-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (656.9 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

pysnaptest-0.1.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl (695.5 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ i686

File details

Details for the file pysnaptest-0.1.3.tar.gz.

File metadata

  • Download URL: pysnaptest-0.1.3.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for pysnaptest-0.1.3.tar.gz
Algorithm Hash digest
SHA256 94786dda92f456231ef7f74d1c29ccf422d3fecf7f391d260c6ecf0fe7ce4f60
MD5 36a6148185e13583f4dc1fff0b0af8c5
BLAKE2b-256 364d485d079d221573837974bf2dedad4a6fe243cc80bbb7b05107ee695b03de

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8d6bfc5eb460caa5ef2d92a4ecd65155940375e0923f18aee639bfac537d543f
MD5 4f07e2e7690fe8b2ec2980c0494c96bb
BLAKE2b-256 e0f7be01ce8b910734f233f25dd077c04b7d6d47bf25a9eb2f965b5e8f312714

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-pp310-pypy310_pp73-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 2478c81bcd7003958a421f20da4d30b16fdc08e294ae5a9a9b0e25792136bbd9
MD5 abe1f8d2d0f0366ac18c94ac42bef555
BLAKE2b-256 d9919031cd3d81db62be20fe780ea2705459012918eea9db53ff7b5a27ca77c0

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6411dc7673d018288388af7646000f03e0d250831a8376fe3b0e59eb48a3318
MD5 8b2a926e84e7ece2bb5085c3f26d8078
BLAKE2b-256 e0e76434d01b4c3acca33a026fc4036a6744b774f9c382e62a641bc6d552b97d

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp313-cp313-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 2e0b8866b6cf2407fd3c5946945c2d7c9fa10aa5a0de21e94c3bfd537b9889b3
MD5 9c45b90998d7e4895fab1a9c1ac79e3d
BLAKE2b-256 944ec2ff89cc5aa5c19e093626603c093cf46e23994aa49dd224fbb92448058e

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: pysnaptest-0.1.3-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 512.7 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for pysnaptest-0.1.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 51c1933e1ca4628ac9a427c2ebb4ccd435897615d0c5d258a3b4605a69b718f3
MD5 e465bdf0e3ecae2391ae320dd513dd52
BLAKE2b-256 5d97507a3d0f7e9aab94ead56612e51de48c5459d9164982f61ad044977be0a2

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f47d8537ad39bb145694328214f8a585d1e6cf653e4806f63ad4a41f965841c
MD5 25621d68083043482a0978241b73ceaf
BLAKE2b-256 6206968bcbf9da9ef864e3547b5dc3853a53ed5a5ef1ff802417644f794e5915

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 4bd9465142a00f6e293bb266aef9005e81bbb1145648d2eba4944ecda45701ae
MD5 0da9aace2695498c4aac7efd11859983
BLAKE2b-256 2388aaed6fb13fb1a91e15534fd91e5e7ce8c224e7adcd9a76a71e431ebb1143

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: pysnaptest-0.1.3-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 513.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for pysnaptest-0.1.3-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 32e1e945a5b957bc491c670343212387e5c4569f123070957bd2df0f8c665b58
MD5 cdbb04c47ac549550ac5d2d3b0ff9b2e
BLAKE2b-256 cac153768d2f151c4d544857333383a343496c877b6945423f4836b8f5f692a7

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 e6c48440a52467fcd38c83745bd198f3c13e9e07129e031a3adb6fcb9e55ba6b
MD5 c4d2e4578bbd43f2092cd5828280080a
BLAKE2b-256 49957a2f722d81839947653a5e899efe91c80338bb71487c5984dfb28a0b5326

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 f526701c2b59d61f5a60b3ffc5fe56949d3c15c7695b3ecf607bffd2b32a4a14
MD5 8bb86eef46899bf039c99bc240897c30
BLAKE2b-256 ad98711263d545addb12d0570ddf8c98f09f45838ef90bc6a612b8d6cf54bdee

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: pysnaptest-0.1.3-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 513.2 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for pysnaptest-0.1.3-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2c164aa279c7243cd52d1c20a8deeb575819869dd3921bbaf7b5b4f4e5fe15cd
MD5 23b8394dff779971484dbcc6f673a348
BLAKE2b-256 a2f09b9ed06d209b2e8bfacc54a51f2f1c674fc33597ef403fa30455435e7902

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c2628ab92fa519b69830c80564ac1e7da4ecf1e20d7e29a0581d801b090521fc
MD5 f81c19d5f72b4d70a5de49e8094ad65e
BLAKE2b-256 80e2edddb99ce4ebffc9a4fce60d33b9ea964330be3626d0cdfbc0804979a164

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3e86dec07a2004ed2d25b3cf67ea8b0a75a52b7635854ea3103e921f1eb684b7
MD5 5014adfb1cd96c36450c0d8de56c386e
BLAKE2b-256 5494791d85103d3070ddcd24df1efd882a898d3df5a3edfa64e111e17695bd52

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: pysnaptest-0.1.3-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 513.1 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for pysnaptest-0.1.3-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 2af0f19ebf655acd6d26661401fb0e6f3906cb36ff20bc91635a802d2b13b164
MD5 5e8294bf310c4d6fb9bd1d8c0964bc77
BLAKE2b-256 186a9bec9a07d4c13ea2e55d1719c547f0e3ea993ad95d1b1d5b8e5662d289f5

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 13b43585fb3acaa33d2112a8b92ee02495c02df8ea436761a1575dec7027c554
MD5 4adde8407e5957e1bf4ccfe4c7479ce2
BLAKE2b-256 4add7ee75b262031df441515e7bfc58a753f8d12f8c3d38a328532236e1e7b90

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 2020ef14b2975d52654a70c60bceb891ea1ea643abf8e7e1d259db985306c508
MD5 4c0deb26d849b80de3fcc9d158f40159
BLAKE2b-256 4f5bf7f4f19a6e795693c212789a20096a8fdb7dcae64f86432b4fc5deec552f

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: pysnaptest-0.1.3-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 513.2 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.4

File hashes

Hashes for pysnaptest-0.1.3-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 50f7d16fa7f6c4e15595682cdd579119b167a6e9aa0b9f008d917d2e5417816e
MD5 c69904dc14d0d653b1165e0013250ed8
BLAKE2b-256 492075bae464d583e281a9b04c5170f6bb38dc27c9ef32e32133e6c05c055703

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 859fb4696e8e7a97cccc627cea314643833df907f9d67ff69cd1e22ae63ec576
MD5 8588bca7c55a5bcf9f54d93140187a91
BLAKE2b-256 cef642688e6fb71f538f9a842f205c8c0304e8282bb86b2d3c3d01e7fe75f125

See more details on using hashes here.

File details

Details for the file pysnaptest-0.1.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl.

File metadata

File hashes

Hashes for pysnaptest-0.1.3-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl
Algorithm Hash digest
SHA256 3c0bd32a39241b0b5fd6b2c310c1b9e008e681afcda957683081e6c57e4e76eb
MD5 bc3a0edaae1f2537a9c56844e87223a1
BLAKE2b-256 57559eff6d26b00b924202316a021dc526fe317029f387df5e09aabaeb38ed26

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