From 7440263b690d0a61eab0eaa692b34f326cb64f87 Mon Sep 17 00:00:00 2001 From: Ramon Bartl Date: Mon, 11 Nov 2024 07:21:22 +0100 Subject: [PATCH] Ignore spotchem file --- src/senaite/astm/tests/base.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/senaite/astm/tests/base.py b/src/senaite/astm/tests/base.py index 33954f4..8147d9e 100644 --- a/src/senaite/astm/tests/base.py +++ b/src/senaite/astm/tests/base.py @@ -8,6 +8,10 @@ from senaite.astm.constants import ACK from senaite.astm.constants import ENQ +IGNORE_INSTRUMENT_FILES = [ + "spotchem_el.txt" # Not valid ASTM (see PR #19) +] + class ASTMTestBase(IsolatedAsyncioTestCase): """Base Test Class @@ -27,7 +31,9 @@ def instrument_files(self): """Returns all instrument files from the data directory """ path = "{}/*.txt".format(self.data_dir) - return glob(path) + files = glob(path) + return filter(lambda x: os.path.basename(x) + not in IGNORE_INSTRUMENT_FILES, files) def get_instrument_file_path(self, filename): """Returns the instrument file path