How do you run the test modules?
Opened this issue · 2 comments
Deleted user commented
This might be a dumb question. I want to run annotation_test.py to experiment on issue #34.
I ran
cd remapy/
source env/bin/activate
First I tried
python3 test/annotation_test.py
which of course results in
Traceback (most recent call last):
File "test/annotation_test.py", line 3, in <module>
from model.render import pdf
ModuleNotFoundError: No module named 'model'
Then I tried
python3 -m test.annotation_test
which usually properly understands imports, but gives
/home/username/.apps/remapy/env/bin/python3: No module named test.annotation_test
here.
However, I can get it to work by renaming the test dir
mv test test2
python3 -m test2.annotation_test
This fixes the error above, because it circumvents the python standard library module "test".
How do I run the tests properly?
peerdavid commented
Thanks - yea could easily be that I destroyed something due to re-organizing folders etc. Feel free to propose a different solution