# import file mismatch:
tests/test_a.py has __pycache__ but tests/test_a.py has different __pycache__
HINT: remove __pycache__ files or use --import-mode=importlib

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

## Root Cause

Two test files share the same module basename (e.g. tests/api/test_a.py and tests/db/test_a.py) and neither directory has an __init__.py, so pytest's prepend import mode collides on the module name.

## Version Compatibility

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

## Workarounds

1. **** (95% success)
   ```
   # pytest.ini
[pytest]
importmode = importlib
   ```
2. **** (90% success)
   ```
   touch tests/__init__.py tests/api/__init__.py tests/db/__init__.py
   ```

## Dead Ends

- **** — Clears the symptom for one run; the next run recreates the collision. (65% fail)
- **** — Works but does not scale; the next same-named file reintroduces the problem. (50% fail)
