# fixture 'my_fixture' not found

- **ID:** `python/pytest-conftest-not-loaded`
- **Domain:** python
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

pytest did not load the conftest.py file containing the fixture. This happens when conftest.py is in the wrong directory, not in the test path, or when rootdir is misconfigured.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 7.x | active | — | — |
| 8.x | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   # Place conftest.py in the tests/ directory or project root
# pytest automatically loads conftest.py from rootdir and test directories
   ```
2. **** (85% success)
   ```
   pytest --confcutdir=tests/
   ```

## Dead Ends

- **** — This duplicates the fixture across multiple test files and defeats the purpose of conftest.py for sharing fixtures. (75% fail)
- **** — pytest does not load fixtures from __init__.py. Only conftest.py files are automatically loaded. (90% fail)
