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'
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']