Beispiel #1
0
    def test_all_combinations_zero_padded():
        import itertools
        cards = range(5)
        inputs = range(1, 15)
        outputs = range(1, 49)

        for card, in_port, out_port in itertools.product(cards, inputs,
                                                         outputs):
            padded = f'{card:01d}{in_port:02d}{out_port:02d}'

            assert {(in_port, out_port)} == KeysightB220X.parse_channel_list(
                padded)
Beispiel #2
0
 def test_parse_channel_list():
     channel_list = '(@10101,10202)'
     assert {(1, 1), (2, 2)} == KeysightB220X.parse_channel_list(
         channel_list)