Skip to content

Commit

Permalink
fix: function testS
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen committed Jun 6, 2017
1 parent 347c0b2 commit ff8a316
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions qcodes/tests/test_channels.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import unittest

from qcodes.tests.instrument_mocks import DummyChannelInstrument, DummyChannel
from qcodes.instrument.channel import ChannelList
from qcodes.utils.validators import Numbers
from qcodes.instrument.parameter import ManualParameter

Expand Down Expand Up @@ -125,8 +126,17 @@ def test_combine_channels(self, setpoints):
self.assertEquals(self.instrument.channels.temperature(), expected)

def test_channel_parameters(self):
self.assertTrue('temperature' in self.instrument.channels.parameters)
self.assertEqual(len(self.instrument.channels.parameters), 1)
self.assertTrue('temperature' in self.instrument.channels.parameters)
self.assertEqual(len(self.instrument.channels.parameters), 1)


def test_channel_functions(self):
dc = DummyChannel(self.instrument, 'Chan' + 'bar', 'bar')
dc.add_function('dummyfunc', call_cmd='foobar')
self.assertTrue('dummyfunc' in dc.functions)
dcl = ChannelList(self.instrument, 'DummyChannelList', DummyChannel)
dcl.append(dc)
self.assertTrue('dummyfunc' in dcl.functions)

class TestChannelsLoop(TestCase):

Expand Down

0 comments on commit ff8a316

Please sign in to comment.