Skip to content

Commit d47d2a5

Browse files
committed
Add assertions for data_unit presence in tabular tests
Additional assertions verify that data_unit is not None for species_data[0] and species_data[1] in TestTabularImport, improving test coverage for unit presence.
1 parent 8a29bb7 commit d47d2a5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

tests/unit/test_tabular.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ def test_csv_import(self):
8080
assert len(m.species_data[1].time) == 11, (
8181
f"Expected 10 time points. Got {len(m.species_data[1].time)}"
8282
)
83+
84+
assert m.species_data[0].data_unit is not None, (
85+
f"Expected data unit. Got {m.species_data[0].data_unit}"
86+
)
8387
assert m.species_data[0].data_unit.name == "mmol / l", (
8488
f"Expected mM. Got {m.species_data[0].data_unit}"
8589
)
@@ -93,6 +97,9 @@ def test_csv_import(self):
9397
f"Expected None. Got {m.species_data[0].time_unit}"
9498
)
9599

100+
assert m.species_data[1].data_unit is not None, (
101+
f"Expected data unit. Got {m.species_data[1].data_unit}"
102+
)
96103
assert m.species_data[1].data_unit.name == "mmol / l", (
97104
f"Expected mM. Got {m.species_data[1].data_unit.name}"
98105
)

0 commit comments

Comments
 (0)