Skip to content

Commit

Permalink
Add test for loading draeger data including pressure pod data
Browse files Browse the repository at this point in the history
  • Loading branch information
psomhorst committed Dec 16, 2024
1 parent 007df84 commit 176ce86
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand All @@ -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")
Expand Down
5 changes: 5 additions & 0 deletions tests/test_loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit 176ce86

Please sign in to comment.