# Failed: fixture 'client' not found in teardown

- **ID:** `python/pytest-fixure-teardown-error`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在 fixture 的 teardown 代码中尝试访问另一个不存在的 fixture

## Version Compatibility

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

## Workarounds

1. **** (90% success)
   ```
   @pytest.fixture
def client():
    yield create_client()
    # teardown code
   ```
2. **** (80% success)
   ```
   def client(request):
    c = create_client()
    request.addfinalizer(c.close)
    return c
   ```

## Dead Ends

- **** — teardown 阶段不应创建新 fixture (80% fail)
- **** — 会导致资源泄漏 (60% fail)
