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.1.tar.gz (7.4 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.1-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lu_python-0.0.1.tar.gz
  • Upload date:
  • Size: 7.4 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.1.tar.gz
Algorithm Hash digest
SHA256 314126ebc9fc155ae458bb4623e2b808626655cd1040b389bea99b9bc3846292
MD5 7fc360e6588f7517b32d46609b857b7e
BLAKE2b-256 7169df0d85b65ddcd94adbc05c6458203aabe3733d38a8d164879709aff530a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for lu_python-0.0.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: lu_python-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.0 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 dd14bfebe7f3b66bc4baa34ae2315bba7e28dc56ec510fa9e8edceba1c5be364
MD5 1e83cbd12c7c307ba63c2b15a485fa17
BLAKE2b-256 9a61d074c063bf3c5fdf4cf8728757554d1ea267ac2212367d0c1397e3440d84

See more details on using hashes here.

Provenance

The following attestation bundles were made for lu_python-0.0.1-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