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)
def test_size(self): "Valid bus size presented" l = Reset() self.assertTrue(l.size() == 1)