Metadata-Version: 2.4
Name: lu-python
Version: 0.0.3
Summary: Lightweight recorder/fixture helper (formerly mcr)
Author: Jack Xu
License: MIT License
        
        Copyright (c) 2025 Judy Wong
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: testing,recording,fixtures
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: zstd
Requires-Dist: zstandard>=0.21.0; extra == "zstd"
Provides-Extra: dev
Requires-Dist: pytest>=7.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.20; extra == "dev"
Requires-Dist: coverage; extra == "dev"
Dynamic: license-file

# 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:

```py
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.
