I like to run unit-tests during Teamcity build. I configure this step in the build like pytest with arguments test/unit/*.py. During this run I have "ModuleNotFoundError" for a module that I am actually testing. So my guess is that somehow the tree structure or working directory is changing. So my working tree looks like that:
pipeline ---> __init__.py (empty file)
pipiline ---> model.py
inside this file I have this definition
class Model():
The test folders are following:
test ---> unit ---> test_model.py
inside test_model.py I have:
from model import Model
During the run I have
ModuleNotFoundError: No module named 'model'
I guess I should somehow define the Model class like dll, but I do not understand how to do this in Python.