Exemple #1
0
 def test_modifiers_set_wrong(self):
     """Test of setting wrong value to 'modifiers' attribute of a bit field."""
     bf = BitField('bf_a', access='ro')
     with pytest.raises(ValueError):
         bf.modifiers = 'sc'
Exemple #2
0
 def test_modifiers_access(self):
     """Test of accessing to 'modifiers' attribute of a bit field."""
     bf = BitField('bf_a', access='rw')
     bf.modifiers = ['hwu']
     assert bf.modifiers == ['hwu']