-
Notifications
You must be signed in to change notification settings - Fork 113
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
contains_inanyorder fails although I would expect it to pass #185
Comments
I think you've identified a real bug; I would expect the matcher to handle mixed types with no issue. |
The comparison is taking place in |
So, for example |
…hrow a TypeError. Fix for hamcrest#185
@brunns I don't think having it return assert_that("a", is_not(greater_than(1))) Really I think ternary logic will be required to resolve this. |
version 2.0.2
I would expect is to pass as the definition of the matcher is:
"This matcher iterates the evaluated sequence, seeing if each element satisfies any of the given matchers."
Reason for thie behavior is that:
matcher.matches(item) throughs a TypeErrror when running
a
againstgreater_than(0
TypeError: '>' not supported between instances of 'str' and 'int'
What is curious though is that it is catched here:
But is this the correct and expected behaviour though?
The text was updated successfully, but these errors were encountered: