Bug Report
Environment
pytest==8.3.0, pytest-memray==1.7.0
Repro Steps
pytest --memray -p no:cacheprovider gets the error
if _config.cache is not None:
AttributeError: 'Config' object has no attribute 'cache'
This is due to here:
|
if _config.cache is not None: |
if _config.cache is not None:
cache = _config.cache.get(f"memray/{_test_id}", {})
previous = cache.get("total_allocated_memory", float("inf"))
Expected behavior/code
Able to run pytest memray without the cacheprovider plugin
Possible Solution
Replace if _config.cache is not None: with if getattr(_config, 'cache', None) is not None: