Closed 51N84D closed 4 years ago
I think both should be fine as it depends on where you run the python interpreter from, either from root or within tests/
I agreed with Sun: If a script is located in /A/B/name.py
Path(file).parent.parent.resolve() you get: /A/B
Path(file).resolve().parent.parent you get: /A
In our situation, we should choose the latter one because the omnigan folder is here.
there was a typo in the config locations which I just fixed but python tests/run.py
runs fine ; if you'd rather run tests from within tests/ that's fine too, but don't remove the ability to run from root :)
Ah got it
For some reason I'm getting the error
ModuleNotFoundError: No module named 'omnigan'
when runningrun.py
as is.Changing
sys.path.append(str(Path(__file__).parent.parent.resolve()))
tosys.path.append(str(Path(__file__).resolve().parent.parent))
in all the test programs fixes the problem for me. Is this the case for you guys?