Skip to content

Commit

Permalink
Merge pull request #213 from Canadian-Light-Source/pytest_fail
Browse files Browse the repository at this point in the history
fixed errors from pytest
  • Loading branch information
kivel authored Apr 8, 2024
2 parents 8fca621 + b89b118 commit 3b6d8d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 0 additions & 6 deletions scripts/jinja2/ecmcYamlHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
5 changes: 4 additions & 1 deletion scripts/jinja2/pytest/test_ecmcAxes.py
Original file line number Diff line number Diff line change
@@ -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):
Expand Down

0 comments on commit 3b6d8d8

Please sign in to comment.