-
Notifications
You must be signed in to change notification settings - Fork 347
Closed
Description
The MockModel is now a subclass of ServerManager. Is this necessary?
The result is that most methods of a MockModel do not work as expected.
One can use the .ask and .write methods, but the other attributes of a MockModel are not updated. For example
from toymodel import AModel, MockGates, MockSource, MockMeter, AverageGetter, AverageAndRaw
model = AModel()
gates = MockGates('gates', model=model)
meter = MockMeter('meter', model=model)
print('model._gates %s' % (model._gates, ))
print('model.gates_get(c0) %s' % (model.gates_get('c0') ))
print('chan0: %f' % gates.chan0.get() )
print('meter.amplitude: %f' % meter.amplitude.get() )
gates.chan0.set(2)
print('model._gates %s' % (model._gates, ))
print('model.gates_get(c0) %s' % (model.gates_get('c0') ))
print('chan0: %f' % gates.chan0.get() )
print('meter.amplitude: %f' % meter.amplitude.get() )After setting gates.chan0 the model in the server is updated, but the model._gates and model.gates_get('c0') are not.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels