We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment pytest==8.3.0, pytest-memray==1.7.0
pytest==8.3.0
pytest-memray==1.7.0
Repro Steps pytest --memray -p no:cacheprovider gets the error
pytest --memray -p no:cacheprovider
if _config.cache is not None: AttributeError: 'Config' object has no attribute 'cache'
This is due to here:
pytest-memray/src/pytest_memray/marks.py
Line 206 in e2d0aed
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:
if _config.cache is not None:
if getattr(_config, 'cache', None) is not None:
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Bug Report
Environment
pytest==8.3.0
,pytest-memray==1.7.0
Repro Steps
pytest --memray -p no:cacheprovider
gets the errorThis is due to here:
pytest-memray/src/pytest_memray/marks.py
Line 206 in e2d0aed
Expected behavior/code
Able to run pytest memray without the cacheprovider plugin
Possible Solution
Replace
if _config.cache is not None:
withif getattr(_config, 'cache', None) is not None:
The text was updated successfully, but these errors were encountered: