I am using PyTest, but it can't seem to run my import statements.
My directory structures is like this:
-[app]
-script1.py
-[tests]
-test1.py
My test1.py
file includes this line:
from script1 import my_func
and I get an error like ModuleNotFoundError: No module named script1
when I run pytest from the command line.
I tried adding this statement to cd
the directory above but it didn't work:
import os
os.chdir('..')