Esempio n. 1
0
 def test_constructor(self):
     "Constructor with valid and invalid configuration"
     with self.assertRaises(TypeError):
         l = Reset('8')
     with self.assertRaises(TypeError):
         l = Reset(-1)
     with self.assertRaises(TypeError):
         l = Reset(2)
     l = Reset(1)
     self.assertTrue(l.size() == 1 and l.read() == 1)
     l = Reset()
     self.assertTrue(l.size() == 1 and l.read() == 0)
Esempio n. 2
0
 def test_size(self):
     "Valid bus size presented"
     l = Reset()
     self.assertTrue(l.size() == 1)