# 未找到 fixture 'test_data'

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

## 根因

fixture 定义在 conftest.py 中，但该文件不在测试文件所在目录或其父目录中，或者 fixture 名称拼写错误。

## 版本兼容性

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

## 解决方案

1. **** (98% 成功率)
   ```
   Create conftest.py in the test directory and define the fixture there.
   ```
2. **** (90% 成功率)
   ```
   Verify the fixture name and that it's defined at module level.
   ```

## 无效尝试

- **** — If the fixture is needed by multiple tests in different files, it won't be available. (50% 失败率)
- **** — Fixture names are case-sensitive and must match exactly. (80% 失败率)
