correct logic for tests in 20.1 and provide more descriptive errors #1170
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please check if the PR fulfills these requirements:
Related issue (if applicable): #1125 and #1169
The tests should all run appropriately now, as seen in these screenshots:



The only case I wasn't sure about was the situation described in #1125
While this may be confusing, I believe that failing the test in #1125 is not a bug and should be considered the intended functionality.
The reason for this behavior is the use of the
varkeyword within the scope of the run() function. Whenvaris used, a new variable is initialized which is only defined in the scope it's initialized in. So, for example:In the run() function, there is a local variable called robot_name that you initialized that only exists in run(). Meanwhile, there is a global variable, also called robot_name, that is invalid, and it stays invalid because it was never accessed or changed.
All of this to say that I don't see any other way around this other than explicitly directing users not to use
varin their code here. It might be confusing to them and they might wonder why, but it's even more confusing to leave it as is.Here's the new functionality in these cases:
