# ERROR: file or directory not found: tests/conftest.py

no tests ran in 0.001s

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

## Root Cause

conftest.py is a configuration file, not a test module; pytest does not collect tests from it. Passing it explicitly on the command line produces this error.

## Version Compatibility

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

## Workarounds

1. **** (97% success)
   ```
   Run the test directory or a specific test, not conftest.py:
pytest tests/
# or
pytest tests/test_api.py::test_health
   ```
2. **** (85% success)
   ```
   If you want to test fixture logic, move helpers to a module and import them:
# tests/helpers.py
def make_client(): ...
# tests/test_helpers.py
from tests.helpers import make_client
   ```

## Dead Ends

- **** — Fixtures defined there are no longer auto-discovered by sibling tests; they break. (90% fail)
- **** — pytest still ignores tests in conftest.py; behavior is undefined and confusing. (85% fail)
