From 176ce86fe631b2cb02896c24096c400334e5c305 Mon Sep 17 00:00:00 2001 From: Peter Somhorst Date: Mon, 16 Dec 2024 20:48:05 +0100 Subject: [PATCH] Add test for loading draeger data including pressure pod data --- tests/conftest.py | 6 ++++++ tests/test_loading.py | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 45bfdd48f..7cdcb190e 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,6 +15,7 @@ draeger_file1 = data_directory / "Draeger_Test3.bin" draeger_file2 = data_directory / "Draeger_Test.bin" draeger_file3 = data_directory / "Draeger_Test_event_on_first_frame.bin" +draeger_file_pp = data_directory / "Draeger_PP_data.bin" timpel_file = data_directory / "Timpel_test.txt" dummy_file = data_directory / "not_a_file.dummy" @@ -34,6 +35,11 @@ def draeger_both(): return load_eit_data([draeger_file2, draeger_file1], vendor="draeger", sample_frequency=20, label="draeger_both") +@pytest.fixture(scope="session") +def draeger_pp(): + return load_eit_data(draeger_file_pp, vendor="draeger", sample_frequency=20, label="draeger2") + + @pytest.fixture(scope="session") def timpel1(): return load_eit_data(timpel_file, vendor="timpel", label="timpel") diff --git a/tests/test_loading.py b/tests/test_loading.py index 265e07fc8..6fca2a397 100644 --- a/tests/test_loading.py +++ b/tests/test_loading.py @@ -18,6 +18,7 @@ def test_loading_draeger( draeger1: Sequence, draeger2: Sequence, draeger_both: Sequence, + draeger_pp: Sequence, ): assert isinstance(draeger1, Sequence) assert isinstance(draeger1.eit_data["raw"], EITData) @@ -34,6 +35,10 @@ def test_loading_draeger( draeger2.eit_data["raw"], ) + # draeger data with pressure pod data has 10 continuous medibus fields, 'normal' only 6 + assert len(draeger_pp.continuous_data) == 10 + 1 + assert len(draeger1.continuous_data) == 6 + 1 + # test below not possible due to requirement of axis 1 ending before axis b starts # draeger_inverted = load_eit_data([draeger_file1, draeger_file2], vendor="draeger", label="inverted") # assert len(draeger_both) == len(draeger_inverted)