I have a project structure like this:
cartesianproduct
test
__init__.py
test_cartesian_product.py
__init__.py
__main__.py
main.py
sequence_creation.py
sequences_operations.py
In test_cartesian_product.py
I import
from .. import sequences_operations
from .. import sequence_creation
In __main__.py
I import from tests import test_cartesian_product_package
and running test_cartesian_product_package.running_tests()
But at startup __main__.py
i get an error
from .. import sequences_operations
ImportError: attempted relative import beyond top-level package
If I just run test_cartesian_product.py
i get the same error.
How to fix it?