Skip to main content

Lightweight recorder/fixture helper (formerly mcr)

Project description

lupy

Lightweight recorder/fixture helper (formerly mcr).

This package provides a small context-manager record() which can patch module-qualified functions or instance methods to record return values (or exceptions) to compressed pickle files and write a manifest.json of the recordings.

Usage example:

import lupy
with lupy.record({ 'tests.fixtures.Foo.expensive_method': None }, recordings_dir='tests/fixtures/recordings/'):
    foo = Foo()
    foo.expensive_method()

See tests in tests/test_lupy.py for more examples.

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

lu_python-0.0.3.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

lu_python-0.0.3-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file lu_python-0.0.3.tar.gz.

File metadata

  • Download URL: lu_python-0.0.3.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lu_python-0.0.3.tar.gz
Algorithm Hash digest
SHA256 ef1ee2b806f0c7bb0314981cb0f8e9f180394064595c489cf5dfec240753811c
MD5 a6609bb9cc00acd5c58e6a0607459917
BLAKE2b-256 886c5c37a30fbcb456f41a67247827785ae4501f4825bc8c1a47dbde1e1e5a22

See more details on using hashes here.

Provenance

The following attestation bundles were made for lu_python-0.0.3.tar.gz:

Publisher: python-publish.yml on jackxxu/lupy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lu_python-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: lu_python-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for lu_python-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 fc01baf582388fe49f404ad3bfded3a27c3d230e28820ca4d773c5dcdc957b67
MD5 353c9b1b12fd3c7e0b452b9d915d3bd9
BLAKE2b-256 b99b71ea4b6c34f42d274bcdd1b6eddefe65d2766e5fc1a4003fa3ea0460aabb

See more details on using hashes here.

Provenance

The following attestation bundles were made for lu_python-0.0.3-py3-none-any.whl:

Publisher: python-publish.yml on jackxxu/lupy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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