# ImportError: import file mismatch:
imported module 'test_utils' has this __file__ attribute:
  /path/to/other/test_utils.py
which is not the same as the test file we want to collect:

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

## Root Cause

存在多个同名测试模块，pytest 导入时发生冲突，通常因为目录结构或 __init__.py 问题。

## Version Compatibility

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

## Workarounds

1. **创建 __init__.py** (85% success)
   ```
   在相关目录中添加 __init__.py 文件，确保包结构清晰
   ```
2. **pytest --import-mode=importlib** (90% success)
   ```
   使用 --import-mode=importlib 运行 pytest
   ```

## Dead Ends

- **删除重复文件** — 尝试删除其中一个文件，但可能破坏测试逻辑 (50% fail)
- **修改 sys.path** — 尝试在 conftest.py 中修改 sys.path 但未解决根本问题 (60% fail)
