python
install_error
ai_generated
true
fixture 'benchmark' not found
ID: python/pytest-benchmark-no-plugin
80%Fix Rate
90%Confidence
0Evidence
2024-03-05First Seen
Version Compatibility
| Version | Status | Introduced | Deprecated | Notes |
|---|---|---|---|---|
| 4.x | active | — | — | — |
Root Cause
The `pytest-benchmark` plugin is not installed or not enabled, so the `benchmark` fixture is unavailable.
generic中文
`pytest-benchmark` 插件未安装或未启用,因此 `benchmark` fixture 不可用。
Workarounds
-
95% success
pip install pytest-benchmark pytest --benchmark-only
-
90% success
echo 'pytest-benchmark' >> requirements-dev.txt pip install -r requirements-dev.txt
Dead Ends
Common approaches that don't work:
-
80% fail
Loses all benchmarking features (statistics, comparison, JSON output).
-
90% fail
Fails if the plugin is not installed; the error becomes `ModuleNotFoundError`.