Beispiel #1
0
 def test_initial_set_wrong(self):
     """Test of setting wrong value to 'initial' attribute of a bit field."""
     bf = BitField('bf_a')
     with pytest.raises(ValueError):
         bf.initial = 0.0
Beispiel #2
0
 def test_initial_access(self):
     """Test of accessing to 'initial' attribute of a bit field."""
     bf = BitField('bf_a')
     bf.initial = 2
     assert bf.initial == 2