File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,12 +46,16 @@ def test_default_protocol():
4646
4747def test_to_table (example_protocol : Protocol ):
4848 """Ensure that the protocol can be correctly converted to a table."""
49- df = example_protocol .to_table ()
50- assert df is not None
51- assert "Protocol Parameter" in df .columns
52- assert "Value" in df .columns
53- assert "Units" in df .columns
54- assert df [df ["Protocol Parameter" ] == "ID" ]["Value" ].iloc [0 ] == "example_protocol"
49+ t = example_protocol .to_table ()
50+ assert t is not None
51+ assert "Category" in t .columns
52+ assert "Name" in t .columns
53+ assert "Value" in t .columns
54+ assert "Unit" in t .columns
55+ tm = t .set_index (["Category" , "Name" ])
56+ assert tm .loc ["" ,"ID" ]["Value" ] == example_protocol .id
57+ assert tm .loc ["Delay Method" , "Default Sound Speed" ]["Value" ] == 1540.0
58+ assert tm .loc ["Delay Method" , "Default Sound Speed" ]["Unit" ] == "m/s"
5559
5660@pytest .mark .parametrize (
5761 "target_constraints" ,
You can’t perform that action at this time.
0 commit comments