Esempio n. 1
0
 def test_lsb_set_wrong(self):
     """Test of setting wrong value to 'lsb' attribute of a bit field."""
     bf = BitField('bf_a')
     with pytest.raises(ValueError):
         bf.lsb = -1
Esempio n. 2
0
 def test_lsb_access(self):
     """Test of accessing to 'lsb' attribute of a bit field."""
     bf = BitField('bf_a')
     bf.lsb = 3
     assert bf.lsb == 3