# PytestConfigWarning: Unknown config option: filterwarnings

- **ID:** `python/pytest-warning-filter-error`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pytest.ini 或 pyproject.toml 中配置了错误的 filterwarnings 语法

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.4.0 | active | — | — |

## Workarounds

1. **** (90% success)
   ```
   在 pytest.ini 中使用 filterwarnings = error::DeprecationWarning
   ```
2. **** (85% success)
   ```
   pytest -W error::DeprecationWarning
   ```

## Dead Ends

- **** — 警告可能掩盖实际问题 (30% fail)
- **** — 无法控制警告，测试输出混乱 (40% fail)
