Beispiel #1
0
 def test_init(self):
   sca = libO2Alf.ScaInterface("#1", 0)
Beispiel #2
0
 def test_execute_command_fails(self): #TODO: w/ expected output
   sca = libO2Alf.ScaInterface("#1", 0)
   with self.assertRaises(RuntimeError):
     sca.execute_command(0xcafe, 0x1234)
Beispiel #3
0
 def test_sequence_error(self): #TODO: update
   sca = libO2Alf.ScaInterface("#1", 0)
   seq = [("command", (0xdeadbeef,0xfec)),
         ("command", (42, 54))]
   out = sca.sequence(seq)
   self.assertEqual(out[0][0], "error")
Beispiel #4
0
 def test_svl_connect(self): #placeholder
   sca = libO2Alf.ScaInterface("#1", 0)
   sca.svl_connect()
Beispiel #5
0
 def test_set_channel_fails(self):
   sca = libO2Alf.ScaInterface("#1", 0)
   with self.assertRaises(RuntimeError):
     sca.set_channel(42) #linkId out of range
Beispiel #6
0
 def test_set_channel(self):
   sca = libO2Alf.ScaInterface("#1", 0)
   sca.set_channel(0)
Beispiel #7
0
 def test_sc_reset(self):
       sca = libO2Alf.ScaInterface("#1", 0)
       sca.sc_reset()
Beispiel #8
0
 def test_init_fails(self):
   with self.assertRaises(RuntimeError):
     sca = libO2Alf.ScaInterface("#1", 42) # linkId out of rangee