Use relative import
In test1.py
, modify the import statement like this:
from .test import give_date
However, this will only work if you run the script from outside the naming package using python -m betacode.naming.test1
. If you directly run test1.py
, relative imports will fail.