Fix CI: remove conserver/tests/__init__.py to resolve 'tests' package collision#156
Merged
pavanputhra merged 1 commit intomainfrom Apr 22, 2026
Merged
Conversation
…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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
conserver/tests/__init__.pywhich was causing CI to fail withModuleNotFoundError: No module named 'tests.storage'Root cause
conserver/is inpythonpath(perpytest.ini). Having__init__.pyinconserver/tests/registered a package namedtests— colliding with the root-leveltests/package (which containstests/storage/test_s3.py). Whichever was imported first would shadow the other, breaking the losing module's import path.Removing
__init__.pymeans pytest importstest_link_metrics.pystandalone (not as a package member).conftest.pyis unaffected — pytest discovers conftest files without needing__init__.py.Test plan
tests.storageimport error)conserver/tests/test_link_metrics.pytests still collected and passing🤖 Generated with Claude Code