I have a problem with that testing. I tried to find anything but all guides are about using pycharm's abilities. So, I have a structure like this:
project1
|-module1.py
tests
|-test1.py
module1.py:
def foo(a, b):
return a + b + 1
test_module1.py:
from project1.module1 import foo
def test_foo():
assert foo(1, 1) == 3
While I stay in root directory (where this structure is located), how can i run testing with pytest from terminal. I really tried my best, but always was getting different errors. Most of them look like ModuleNotFoundError: No module named 'project1'
.
Thanks!!!