improve parameter initialisation

- make 'value' a Parameter property instead of an attribute
- use 'value' instead of 'default' property for setting
  the initial value in the config file
- removal of initwrite parameter property

this change is the basis of a better implementation
for change 30041 (PersistentParam property 'override_cfg')

Change-Id: I2b82bdd54c2dacb87dcd2b3472004d2f0a730cf0
This commit is contained in:
2023-01-19 11:03:04 +01:00
parent 82957c287d
commit f4e974f46c
9 changed files with 82 additions and 102 deletions

View File

@ -132,6 +132,7 @@ def test_poll(ncycles, pollinterval, slowinterval, mspan, pspan, monkeypatch):
m.pollinterval = pollinterval
m.slowInterval = slowinterval
m.run(ncycles)
print(getattr(m.parameters['param4'], 'stat', None))
assert not hasattr(m.parameters['param4'], 'stat')
for pname in ['value', 'status']:
pobj = m.parameters[pname]