diff --git a/viz_scripts/docker/start_tests.sh b/viz_scripts/docker/start_tests.sh index 06dbf8d..f979f23 100644 --- a/viz_scripts/docker/start_tests.sh +++ b/viz_scripts/docker/start_tests.sh @@ -8,6 +8,6 @@ conda env list cd saved-notebooks/tests || exit 1 echo "Starting unit tests..." -PYTHONPATH=. coverage run -m pytest test_plots.py +PYTHONPATH=../.. coverage run -m pytest test_plots.py -v coverage report diff --git a/viz_scripts/tests/test_plots.py b/viz_scripts/tests/test_plots.py index 23d5fef..26d26e3 100644 --- a/viz_scripts/tests/test_plots.py +++ b/viz_scripts/tests/test_plots.py @@ -1,11 +1,9 @@ import pytest as pytest import pandas as pd import numpy as np -import os -import pathlib -import sys -sys.path.append(str(pathlib.Path(__file__).parent.parent)) -import plots as plots +# Using import_module, as we have saved-notebooks as the directory +import importlib +plots = importlib.import_module('saved-notebooks.plots') # Test Data Fixtures @pytest.fixture