This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author brett.cannon
Recipients brett.cannon, danielnoord
Date 2022-01-05.23:10:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641424220.23.0.0871620252539.issue46241@roundup.psfhosted.org>
In-reply-to
Content
This is working as intended. Because you don't have a `__init__.py` file in your `tests` directory, Python considers it a potential namespace package. As such, Python keeps searching for a "normal" package that defines `__init__.py` for the same package name. Since Astroid has one and seemingly has it on `sys.path` in such a way as to get discovered, it gets selected as the package to use for the name `test`.

If you add a `tests/__init__.py` file then your issue will go away.
History
Date User Action Args
2022-01-05 23:10:20brett.cannonsetrecipients: + brett.cannon, danielnoord
2022-01-05 23:10:20brett.cannonsetmessageid: <1641424220.23.0.0871620252539.issue46241@roundup.psfhosted.org>
2022-01-05 23:10:20brett.cannonlinkissue46241 messages
2022-01-05 23:10:20brett.cannoncreate