robotframework-tidy
robotframework-tidy copied to clipboard
RenameVariables handling of default value with environment variables
Robotidy, version 4.11.0 with RenameVariables tries to do the following change of the default value of an environment variable:
- Set Test Variable ${MY_VAR} %{MY_ENV_VAR=None}
+ Set Test Variable ${MY_VAR} %{MY_ENV_VAR=_None}
Manually setting the default value to uppercase or lowercase also satisfies Robotidy:RenameVariables.
- Set Test Variable ${MY_VAR} %{MY_ENV_VAR=None}
+ Set Test Variable ${MY_VAR} %{MY_ENV_VAR=NONE}
I was under the impression that Robot Framework was "None/NONE/none"-insensitive.
Robotidy should probably don't change the default value.
Agreed, robotidy simply do not read default value in RenameVariables (it is parsed as part of the name). I will fix it so default value is ignored.
- also handled variables in defaults:
Log %{MY_ENV=default with ${global}
Log %{MY_ENV=${local}
which should be converted to
Log %{MY_ENV=default with ${GLOBAL}
Log %{MY_ENV=${local}