I moved the test folder (as below - there was a higher app folder also which I have now shown here):
app/tests/test_basic.py
app/app/core.py
and included this in the test_*.py scripts:
module_path = os.path.join(os.path.dirname(sys.path[0]), 'app') sys.path.append(module_path) import corewhich allows for dynamic determination of the appropriate path.
Unfortunately, this sits above an import statement and PEP 8 doesn't like it...oh well.