File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22import unittest
33
44from qcodes .tests .instrument_mocks import DummyChannelInstrument , DummyChannel
5+ from qcodes .instrument .channel import ChannelList
56from qcodes .utils .validators import Numbers
67from qcodes .instrument .parameter import ManualParameter
78
@@ -125,8 +126,17 @@ def test_combine_channels(self, setpoints):
125126 self .assertEquals (self .instrument .channels .temperature (), expected )
126127
127128 def test_channel_parameters (self ):
128- self .assertTrue ('temperature' in self .instrument .channels .parameters )
129- self .assertEqual (len (self .instrument .channels .parameters ), 1 )
129+ self .assertTrue ('temperature' in self .instrument .channels .parameters )
130+ self .assertEqual (len (self .instrument .channels .parameters ), 1 )
131+
132+
133+ def test_channel_functions (self ):
134+ dc = DummyChannel (self .instrument , 'Chan' + 'bar' , 'bar' )
135+ dc .add_function ('dummyfunc' , call_cmd = 'foobar' )
136+ self .assertTrue ('dummyfunc' in dc .functions )
137+ dcl = ChannelList (self .instrument , 'DummyChannelList' , DummyChannel )
138+ dcl .append (dc )
139+ self .assertTrue ('dummyfunc' in dcl .functions )
130140
131141class TestChannelsLoop (TestCase ):
132142
You can’t perform that action at this time.
0 commit comments