1515 DummyChannel ,
1616 DummyChannelInstrument ,
1717)
18+ from qcodes .parameters import (
19+ MultiChannelInstrumentParameter ,
20+ )
1821from qcodes .utils import QCoDeSDeprecationWarning
1922
2023if TYPE_CHECKING :
@@ -100,7 +103,10 @@ def test_channels_call_function(
100103
101104
102105def test_channels_get (dci : DummyChannelInstrument ) -> None :
103- temperatures = dci .channels .temperature .get ()
106+ temp_multi_param = dci .channels .temperature
107+ assert isinstance (temp_multi_param , MultiChannelInstrumentParameter )
108+
109+ temperatures = temp_multi_param .get ()
104110 assert len (temperatures ) == 6
105111
106112
@@ -119,19 +125,25 @@ def test_channel_access_is_identical(
119125 assert channel_via_label .temperature () == value
120126 assert channel_via_name .temperature () == value
121127 assert dci .channels [channel ].temperature () == value
122- assert dci .channels .temperature ()[channel ] == value
128+ temp_multi_param = dci .channels .temperature
129+ assert isinstance (temp_multi_param , MultiChannelInstrumentParameter )
130+ assert temp_multi_param ()[channel ] == value
123131 # reset via channel name
124132 channel_via_name .temperature (0 )
125133 assert channel_via_label .temperature () == 0
126134 assert channel_via_name .temperature () == 0
127135 assert dci .channels [channel ].temperature () == 0
128- assert dci .channels .temperature ()[channel ] == 0
136+ temp_multi_param = dci .channels .temperature
137+ assert isinstance (temp_multi_param , MultiChannelInstrumentParameter )
138+ assert temp_multi_param ()[channel ] == 0
129139 # set via index into list
130140 dci .channels [channel ].temperature (value )
131141 assert channel_via_label .temperature () == value
132142 assert channel_via_name .temperature () == value
133143 assert dci .channels [channel ].temperature () == value
134- assert dci .channels .temperature ()[channel ] == value
144+ temp_multi_param = dci .channels .temperature
145+ assert isinstance (temp_multi_param , MultiChannelInstrumentParameter )
146+ assert temp_multi_param ()[channel ] == value
135147 # it's not possible to set via dci.channels.temperature
136148 # as this is a multi parameter that currently does not support set.
137149
0 commit comments