예제 #1
0
파일: ic-test.py 프로젝트: AliceO2Group/ALF
 def test_sequence_zero(self): #TODO: Add a non-failing
     ic = libO2Alf.IcInterface("#1", 0)
     seq = [("write", (0xbb, 0xdd)), 
            ("read", 0xbb)];
     out = ic.sequence(seq)
     self.assertEqual(out, 
                      [("write", (0xbb, 0xdd)),
                       ("read", 0x0)])
예제 #2
0
파일: ic-test.py 프로젝트: AliceO2Group/ALF
 def test_init(self):
   Ic = libO2Alf.IcInterface("#1", 0)
예제 #3
0
파일: ic-test.py 프로젝트: AliceO2Group/ALF
 def test_write_reset_read(self):
   ic = libO2Alf.IcInterface("#1", 0)
   ic.write(0xbb, 0xdd)
   ic.sc_reset();
   self.assertNotEqual(ic.read(0xbb), 0xdd)
예제 #4
0
파일: ic-test.py 프로젝트: AliceO2Group/ALF
 def test_set_channel_fails(self):
   ic = libO2Alf.IcInterface("#1", 0)
   with self.assertRaises(RuntimeError):
     ic.set_channel(42) #linkId out of range
예제 #5
0
파일: ic-test.py 프로젝트: AliceO2Group/ALF
 def test_set_channel(self):
   ic = libO2Alf.IcInterface("#1", 0)
   ic.set_channel(0)
예제 #6
0
파일: ic-test.py 프로젝트: AliceO2Group/ALF
 def test_sc_reset(self):
   ic = libO2Alf.IcInterface("#1", 0)
   ic.sc_reset()
예제 #7
0
파일: ic-test.py 프로젝트: AliceO2Group/ALF
 def test_init_fails(self):
   with self.assertRaises(RuntimeError):
     ic = libO2Alf.IcInterface("#1", 42) # linkId out of range