-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should not do mutating variable resolution #2
Comments
Thanks @DirkRichter ! |
Is variable resolution needed in general? I'm afraid detecting does resolving a variable do something that shouldn't be done is pretty much impossible. For example, |
I think there is value in it, but resolving that allows code execution should not happen or happen only after a failure. |
Thx. Now i understand, why ${d.pop('x')} results in KeyError. When key 'x' is removed from ${d} inside RobotStackTracer, then real robot can not find key 'x'. Thus in general a robot listener should always be side-effect-free (https://dev.to/dev0928/what-is-a-side-effect-of-a-function-in-python-36ei). |
Yeah, the problem is that |
It might be good also to remove variable resolution from higher calls in the stack. |
Fixed in next version. |
Using parameter --listener RobotStackTracer in regular robot run results in different test result (pass vs fail):
running robot Test.robot
running robot --listener RobotStackTracer Test.robot
This --listener RobotStackTracer is now used in latest pabot version and i wonder, why my tests fail with pabot but pass in robot.
Versions:
Windows 10
python 3.9.6
robotframework-pabot 2.0.0
robotframework 4.0.3
The text was updated successfully, but these errors were encountered: