From 055e746a1d4892b9ba9b87fdb6c5a29f7aef25af Mon Sep 17 00:00:00 2001 From: Christian Bespin Date: Mon, 16 Dec 2024 14:22:16 +0100 Subject: [PATCH] TST: Use absolute file locations --- aidatlu/test/software_test.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/aidatlu/test/software_test.py b/aidatlu/test/software_test.py index ee43bc2..896d963 100644 --- a/aidatlu/test/software_test.py +++ b/aidatlu/test/software_test.py @@ -1,15 +1,24 @@ +from pathlib import Path + import numpy as np import tables as tb -from aidatlu.main.data_parser import DataParser from aidatlu.main.config_parser import TLUConfigure +from aidatlu.main.data_parser import DataParser + +BASE_PATH = Path(__file__).parent def test_interpretation(): + """Test data interpretation and compare to reference file + """ + data_parser = DataParser() - data_parser.interpret_data("raw_data_test.h5", "interpreted_data_test.h5") + data_parser.interpret_data( + BASE_PATH / "raw_data_test.h5", "interpreted_data_test.h5" + ) - interpreted_data_path = "interpreted_data.h5" - interpreted_test_data_path = "interpreted_data_test.h5" + interpreted_data_path = BASE_PATH / "interpreted_data.h5" + interpreted_test_data_path = BASE_PATH / "interpreted_data_test.h5" with tb.open_file(interpreted_data_path, "r") as h5_file: interpreted_data = h5_file.root.interpreted_data[:]