Skip to content

Fix CI: remove conserver/tests/__init__.py to resolve 'tests' package collision#156

Merged
pavanputhra merged 1 commit intomainfrom
fix/conserver-tests-package-collision
Apr 22, 2026
Merged

Fix CI: remove conserver/tests/__init__.py to resolve 'tests' package collision#156
pavanputhra merged 1 commit intomainfrom
fix/conserver-tests-package-collision

Conversation

@pavanputhra
Copy link
Copy Markdown
Contributor

Summary

  • Removes conserver/tests/__init__.py which was causing CI to fail with ModuleNotFoundError: No module named 'tests.storage'

Root cause

conserver/ is in pythonpath (per pytest.ini). Having __init__.py in conserver/tests/ registered a package named tests — colliding with the root-level tests/ package (which contains tests/storage/test_s3.py). Whichever was imported first would shadow the other, breaking the losing module's import path.

Removing __init__.py means pytest imports test_link_metrics.py standalone (not as a package member). conftest.py is unaffected — pytest discovers conftest files without needing __init__.py.

Test plan

  • CI "Python conserver unit test" passes (no tests.storage import error)
  • conserver/tests/test_link_metrics.py tests still collected and passing

🤖 Generated with Claude Code

…ollision

conserver/ is in pythonpath, so conserver/tests/__init__.py registered a
'tests' package that shadowed the root-level tests/ package. Whichever was
imported first would win, causing the other to fail with:
  ModuleNotFoundError: No module named 'tests.storage'

Removing __init__.py means pytest imports test_link_metrics.py standalone
instead of as part of a 'tests' package. conftest.py is unaffected.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@pavanputhra pavanputhra merged commit 47e8958 into main Apr 22, 2026
1 check passed
@pavanputhra pavanputhra deleted the fix/conserver-tests-package-collision branch April 22, 2026 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant