Skip to content

Commit 2b24d5c

Browse files
committed
Add missing test
1 parent efd39cc commit 2b24d5c

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/test_channels.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -831,6 +831,20 @@ def test_multi_function_invalid_name_raises(dci: DummyChannelInstrument) -> None
831831
dci.channels.multi_function("nonexistent_func")
832832

833833

834+
def test_multi_function_on_empty_channel_tuple_raises(
835+
empty_instrument: Instrument,
836+
) -> None:
837+
"""Test that multi_function raises AttributeError on empty channel tuple."""
838+
channels = ChannelTuple(empty_instrument, "channels", chan_type=DummyChannel)
839+
empty_instrument.add_submodule("channels", channels)
840+
841+
with pytest.raises(
842+
AttributeError,
843+
match="'ChannelTuple' object has no callable or function 'temperature'",
844+
):
845+
channels.multi_function("temperature")
846+
847+
834848
def _verify_multiparam_data(data) -> None:
835849
assert "multi_setpoint_param_this_setpoint_set" in data.arrays.keys()
836850
assert_array_equal(

0 commit comments

Comments
 (0)