Beispiel #1
0
    def test_get_generator_channel(self):
        red_pitaya = RedPitaya('rp-f0060c.local')

        CHANNEL_ID = 1
        channel = red_pitaya.get_generator_channel(CHANNEL_ID)

        self.assertEqual(CHANNEL_ID, channel.channel_id)
Beispiel #2
0
    def test_get_generator_channel_with_invalid_id(self):
        red_pitaya = RedPitaya('rp-f0060c.local')

        INVALID_CHANNEL_ID = 3
        with self.assertRaises(ValueError):
            generator_channel = red_pitaya.get_generator_channel(INVALID_CHANNEL_ID)