From 671effbb00e13b34b8276a13ab22725ee9f3317d Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Wed, 3 Apr 2024 11:06:48 -0600 Subject: [PATCH 1/2] path fixed --- scripts/jinja2/pytest/test_ecmcAxes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/jinja2/pytest/test_ecmcAxes.py b/scripts/jinja2/pytest/test_ecmcAxes.py index d8238c881..7e0388fbc 100644 --- a/scripts/jinja2/pytest/test_ecmcAxes.py +++ b/scripts/jinja2/pytest/test_ecmcAxes.py @@ -1,12 +1,15 @@ +import sys import pytest import re -from ecmcAxes import EcmcAxis base_path = 'scripts/jinja2/' templates_path = f'{base_path}templates/' yaml_path = f'{base_path}pytest/yaml_files/' ref_path = f'{base_path}pytest/reference_files/' +sys.path.append(base_path) +from ecmcAxes import EcmcAxis + @pytest.mark.dependency() def test_init(): with pytest.raises(TypeError): From b89b118d6153c1308b6700ef267b2f61bd4d3490 Mon Sep 17 00:00:00 2001 From: Niko Kivel Date: Wed, 3 Apr 2024 11:17:35 -0600 Subject: [PATCH 2/2] removed redundant check for PLC file --- scripts/jinja2/ecmcYamlHandler.py | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/jinja2/ecmcYamlHandler.py b/scripts/jinja2/ecmcYamlHandler.py index 0a5e52e9b..917fb05b1 100644 --- a/scripts/jinja2/ecmcYamlHandler.py +++ b/scripts/jinja2/ecmcYamlHandler.py @@ -92,12 +92,6 @@ def checkForPlcFile(self): except KeyError: self.hasPlcFile = False - # Above will not catch error if wrong filename is set in plc.file - if 'plc' in self.yamlData.keys(): - if 'file' in self.yamlData['plc'].keys(): - if not len(self.hasPlcFile and self.yamlData['plc']['file']) > 0: - raise FileNotFoundError("File not found: " + str(plc_file)) - def getAxisType(self, type_=None): if type_ is None: try: