-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Original order of dictionaries is not preserved when they are pretty printed in log messages #4867
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
Comments
I agree sorting doesn't make sense here. I though we do that ourselves, but it turned out that sorting is done by Python's PrettyPrinter that we use to get nicer formatting. Luckily for us it has got We use |
Based on tests this change affects also Log and Should Be Equal keywords when using |
Looking at the code, the change affects also trace logging keyword return values. There the change is definitely a good idea. I believe we can change |
Notice that running tests with the trace level isn't generally a good idea because it increases log file size and can reveal sensitive information. If you want a certain argument to be logged, it's typically better to explicitly log it. For example, adding
or
or
would get the dictionary logged. Starting from RF 7.0, due to this fix, using
would work too and would probably give nicest output. |
Thank you. For now I implemented simple workaround and I'm waiting for RF 7.0 then. |
Python 3.9.2
robotframework 6.0.2
Use case example:
I would like to keep the order of &{targets} from keyword call. For now Free Named Arguments are sorted by alphabetical order.
The text was updated successfully, but these errors were encountered: