Access arguments passed to phases from monitors
- Dominant language
- Python
- Stars
- 722
- Forks
- 237
- Avg merge
- 11h 31m
- Merged PRs (30d)
- 4
Description
I'm trying to access the argument (`node_id`) I provided to my phase from a monitor and here is my code:
```
@htf.plug(mmp=motion_master_plug.MotionMasterPlug)
def speed_monitor(test, mmp, node_id):
return mmp.get_velocity(node_id)
@htf.monitors("velocity", speed_monitor)
@htf.plug(mmp=motion_master_plug.MotionMasterPlug)
def test_velocity_control(test, node_id, mmp):
time.sleep(5)
# Do something here
if __name__ == '__main__':
test = htf.Test(test_velocity_control.with_args(node_id=0))
test.execute(test_start=lambda: "test")
```
But the test execution terminates will the following error:
> Error: __call__() got an unexpected keyword argument 'node_id'
This error only appears if I want to use the monitor and it is completely fine with the phase itself.
Contributor guide
Assessment
This issue has not been assessed yet.