Fix green mode usage from run method kwarg
Closes #469 (closed)
The device server run
method must give the green_mode
kwarg
higher priority than the global green mode. MR !471 (merged) changed
the priority incorrectly, and introduced a regression. Device
servers that use run([...], green_mode=GreenMode.Something)
,
with Devices that do not specify a green_mode
class attribute
would incorrectly fail with an error about mixed green modes.
Priority for green mode is now (highest to lowest): device > run method > global
Also added green_mode
as an option to (Multi)DeviceTestContext
classes so that tests can use this mode of execution as well.