コード例 #1
0
ファイル: test_regmap.py プロジェクト: esynr3z/corsair
 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
コード例 #2
0
ファイル: test_regmap.py プロジェクト: esynr3z/corsair
 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