# pytest.PytestConfigWarning: 未知配置项: timeout
E   Failed: 超时 >300.0s

- **ID:** `python/pytest-timeout-plugin-error`
- **领域:** python
- **类别:** install_error
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

pytest 配置中的 `timeout` 需要 `pytest-timeout` 插件。未安装时该选项被忽略；已安装时测试确实超时。

## 版本兼容性

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

## 解决方案

1. **** (92% 成功率)
   ```
   pip install pytest-timeout, then configure:
[tool.pytest.ini_options]
timeout = 60
timeout_method = "thread"
   ```
2. **** (85% 成功率)
   ```
   Investigate the slow test with `pytest --durations=10` to identify the bottleneck before raising the limit.
   ```

## 无效尝试

- **** — Long-running tests can hang CI indefinitely. (60% 失败率)
- **** — Disables the timeout entirely, defeating the purpose. (70% 失败率)
