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
{{ message }}
Repository navigation
Collection: Dictionary Should Contain Item incorrectly casts values to strings before comparison #4408
Current Dictionary Should Contain Item converts both the expected and the actual value to string before comparison. For example, the following example passes:
*** Settings ***Library Collections
*** Variables ***&{DICT} a=${1}*** Test Cases ***Example
Dictionary Should Contain Item ${DICT} a 1
This makes no sense in general and is also inconsistent with other keywords in Collections that don't do such casting.
It actually made total sense since type in robot are a pain to manage and everything is almost treated as a string.
But then, let's accept the change, but please fix the keyword doc just 3 lines above that clearly state "Value is converted to unicode for comparison."
I just lost half a day trying to understand why all of a sudden I had an integer!=string when it specifically say everything is compared as string!
Activity
cloutierjo commentedon Jul 12, 2023
It actually made total sense since type in robot are a pain to manage and everything is almost treated as a string.
But then, let's accept the change, but please fix the keyword doc just 3 lines above that clearly state "Value is converted to unicode for comparison."
I just lost half a day trying to understand why all of a sudden I had an integer!=string when it specifically say everything is compared as string!