You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to access this variable within a Test class method (method prefix test_)?
Based on the documentation, the test_ methods, only accept the self argument (no data). Within a test_ method, I thought, that I might access the class variables using self.input_param1:
deftest_param(self):
self.log_info(dir(self))
# => This shows in the output, that there is the class propery `input_param1` in the class instanceself.log_info(self.input_param1)
# => this is None (no output)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi community,
I'm pretty new to custom scripting and have a very basic question:
My custom script uses input fields / variables, which are defined in class level (
Script
).Example:
Based on the examples, I know I can access this variable in the
run()
class method using thedata
dictionary:How to access this variable within a Test class method (method prefix
test_
)?Based on the documentation, the
test_
methods, only accept theself
argument (nodata
). Within atest_
method, I thought, that I might access the class variables usingself.input_param1
:Any ideas?
Beta Was this translation helpful? Give feedback.
All reactions