SOS!
I created a function and tried importing it into another python script to do some unit tests. However I am constantly getting a "ModuleNotFoundError". How do I properly import functions form one script to another.
Existing:
from src.somefile import some_function
def test_somefunction:
assert somefunction()
Error
Traceback (most recent call last):
File "test/test_file.py", line 2, in <module>
from src.somefile import convert_epoch
ModuleNotFoundError: No module named 'src'
Folder structure
project/
project/__init__.py
project/src
project/src/__init__.py
project/src/somefile.py
project/test
project/test/__init__.py
project/test/test_file.py
Appreciate if someone can highlight what I am doing wrong and how I can neatly do an import. Thank you!