How to fix “Attempted relative import in non-package” even with __init__.py

Yes. You’re not using it as a package.

python -m pkg.tests.core_test

Leave a Comment