When monorepo is used and there are more than 2 projects, pytest complains that
import file mismatch:
imported module 'tests.training.test_notebooks' has this __file__ attribute:
/Users/mingyu.li/mlops-azure-cuj/mlops-azure-cuj/tests/training/test_notebooks.py
which is not the same as the test file we want to collect:
/Users/mingyu.li/mlops-azure-cuj/unified-run-modes-fs/tests/training/test_notebooks.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
This is happening because the test files have the same name in two or more different directories.
To resolve it, we want to use the internal project directory as the pytest root directory.
When monorepo is used and there are more than 2 projects, pytest complains that
This is happening because the test files have the same name in two or more different directories. To resolve it, we want to use the internal project directory as the pytest root directory.
Covered by existing unit tests.