diff --git a/tests/test_plot/kiconf_init.py b/tests/test_plot/kiconf_init.py index b489af6e..981d1d84 100755 --- a/tests/test_plot/kiconf_init.py +++ b/tests/test_plot/kiconf_init.py @@ -9,6 +9,10 @@ from unittest.mock import patch # Look for the 'utils' module from where the script is running prev_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) +if prev_dir not in sys.path: + sys.path.insert(0, prev_dir) +# One more level for the project +prev_dir = os.path.dirname(prev_dir) if prev_dir not in sys.path: sys.path.insert(0, prev_dir) @@ -19,10 +23,6 @@ logger.setLevel(logging.DEBUG) # Utils import from utils import context -# One more level for the project -prev_dir = os.path.dirname(prev_dir) -if prev_dir not in sys.path: - sys.path.insert(0, prev_dir) from kibot.kicad.config import KiConf from kibot.gs import GS @@ -53,7 +53,6 @@ if context.ki5(): ki_path = pcbnew.GetKicadConfigPath() else: ki_path = pcbnew.SETTINGS_MANAGER.GetUserSettingsPath() - logger.error(ki_path) GS.kicad_conf_path = None if args.no_conf_path else ki_path