# ImportError: cannot import name 'my_helper' from 'conftest' (unknown location)

- **ID:** `python/pytest-conftest-import-error`
- **Domain:** python
- **Category:** module_error
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

A conftest.py file tries to import a function or variable that is not defined in it, often due to a circular import or missing definition.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| 3.8 | active | — | — |
| 3.9 | active | — | — |
| 3.10 | active | — | — |
| 3.11 | active | — | — |
| 3.12 | active | — | — |

## Workarounds

1. **** (95% success)
   ```
   Define the missing function in conftest.py or import it from a separate module: `from my_helpers import my_helper`
   ```
2. **** (90% success)
   ```
   Check for circular imports by restructuring the code to avoid conftest importing itself.
   ```

## Dead Ends

- **** — The issue is not import order but the missing symbol; moving it does not help. (60% fail)
- **** — This changes the intended behavior and may cause other tests to fail. (80% fail)
