# ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: 无法识别的参数: --cov=app --cov-report=term-missing

- **ID:** `python/pytest-cov-not-found`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

未安装 pytest-cov，因此 --cov 参数不被识别。常见于 CI 环境未安装开发依赖。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## 解决方案

1. **** (97% 成功率)
   ```
   pip install pytest-cov
# or
pip install -e '.[test]'

pytest --cov=app --cov-report=term-missing
   ```
2. **** (90% 成功率)
   ```
   pip install coverage
coverage run -m pytest
coverage report -m
   ```

## 无效尝试

- **** — Still errors because the plugin is missing; the config is loaded before flag parsing. (90% 失败率)
- **** — The flag itself is provided by pytest-cov; without the plugin it is also unrecognized. (85% 失败率)
