Brett Cannon <br...@python.org> added the comment:

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.

----------
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46241>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to