When running unit-test or marked-test-<test> from Makefile, a ModuleNotFoundError is raised. This is probably due to switching to relative imports for all .py files in the src/ directory.
Proposed resolution
Suffix the PYTHONPATH variable with the working directory and src/ directory in unit test commands. PYTHONPATH=${PYTHONPATH} pytest becomes: PYTHONPATH=${PYTHONPATH}:$(WD)/src pytest.
Issue
When running
unit-test
ormarked-test-<test>
fromMakefile
, aModuleNotFoundError
is raised. This is probably due to switching to relative imports for all.py
files in thesrc/
directory.Proposed resolution
Suffix the
PYTHONPATH
variable with the working directory andsrc/
directory in unit test commands.PYTHONPATH=${PYTHONPATH} pytest
becomes:PYTHONPATH=${PYTHONPATH}:$(WD)/src pytest
.