In a patch from 2019 (CGP-182, 944e072), a change was made to the waveform 'set' method. As part of this change, it now uses the 'dtype' attribute.
This attribute is only set when the 'init_record' method is called, which is triggered by the softioc.iocInit() call for IOC startup.
Here is my particular use-case:
The module I am working on has its behaviour split into a number of separate 'servers', each with their own EPICS database setup and associated logic. The 'softioc.iocInit()' method is only called by the top-level program, after each of these servers has had a chance to run its own database setup.
The unit tests do not call 'softioc.iocInit()'. They can, for example, allow the servers to run waveform.set() and then check the parameters afterwards.
This has problems after the above bug-fix, as dtype is not set. It seems sensible to me that unit tests should not need to have a running IOC in order to operate. What is your opinion on allowing get() and set() functions to be called before iocInit()? Do you think the above is a good model for unit testing? If it's not, what alternatives should be used?
In a patch from 2019 (CGP-182, 944e072), a change was made to the waveform 'set' method. As part of this change, it now uses the 'dtype' attribute.
This attribute is only set when the 'init_record' method is called, which is triggered by the softioc.iocInit() call for IOC startup.
Here is my particular use-case:
The module I am working on has its behaviour split into a number of separate 'servers', each with their own EPICS database setup and associated logic. The 'softioc.iocInit()' method is only called by the top-level program, after each of these servers has had a chance to run its own database setup.
The unit tests do not call 'softioc.iocInit()'. They can, for example, allow the servers to run waveform.set() and then check the parameters afterwards.
This has problems after the above bug-fix, as dtype is not set. It seems sensible to me that unit tests should not need to have a running IOC in order to operate. What is your opinion on allowing get() and set() functions to be called before iocInit()? Do you think the above is a good model for unit testing? If it's not, what alternatives should be used?