Пример #1
0
 def test_width_set_wrong(self):
     """Test of setting wrong value to 'width' attribute of a bit field."""
     bf = BitField('bf_a')
     with pytest.raises(ValueError):
         bf.width = 0
Пример #2
0
 def test_width_access(self):
     """Test of accessing to 'width' attribute of a bit field."""
     bf = BitField('bf_a')
     bf.width = 16
     assert bf.width == 16