# Fixture 'db' called directly. Fixtures are not meant to be called directly

- **ID:** `python/pytest-fixture-return-not-yield`
- **Domain:** python
- **Category:** runtime_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

在测试中直接调用fixture函数，而不是作为参数注入，导致pytest报错。

## Version Compatibility

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

## Workarounds

1. **** (100% success)
   ```
   def test_example(db):
    assert db is not None
   ```
2. **** (90% success)
   ```
   def test_example(request):
    db = request.getfixturevalue('db')
   ```

## Dead Ends

- **** — 失去fixture的依赖注入和清理功能。 (80% fail)
- **** — 直接调用返回的是fixture对象，不是预期值。 (90% fail)
