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.2.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.2-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lu_python-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 7bee603134509301de48f76dd1ddb6d1fe35e5903ae79ed23c40d82450a96dd3
MD5 d2181416c4cdeec5b3637156055633b0
BLAKE2b-256 95c44f4072b857490ba16a6dd17bc6b6e1861c43edc953f3730320c4f764c273

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: lu_python-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b61675f9bb8f9dc609bfe983537f318e0cdabe2d347da3105f8380b112f5860c
MD5 d5e2044ba4c03654af8a3bb65ec54d96
BLAKE2b-256 9561d6c92b13099d16b772d21a681efa24331b881eabf6a82cc71154d1aa3e61

See more details on using hashes here.

Provenance

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