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

Uploaded Python 3

File details

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

File metadata

  • Download URL: lu_python-0.0.4.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.4.tar.gz
Algorithm Hash digest
SHA256 288243f83b2a043a92c5e9a6e7ad4f66cff4752402f2dfba2cb195c84b87eadf
MD5 b2cc0c2cd61a9b6391d70d6b4eb1bb27
BLAKE2b-256 1fad60412e26cfd49d80faae172cf6f50096d492bf2970e1a7d636600b5cae52

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: lu_python-0.0.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 f8aa42861506213e1cd3385a0bee9f09a667ccafbb78680cb10850e291412fa6
MD5 2a2e0cf8178ac558e666f5d83c9de1e6
BLAKE2b-256 95f576a57afb664dbc27f45e99c3998a71fe30e43f52de1b80eb1b98899443ba

See more details on using hashes here.

Provenance

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