Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7k
Provide tests for hashing ofOperandHolder#9437
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
auvipy left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
thanks for the followup contribution!
| asserthaspermisFalse | ||
| deftest_operand_holder_is_hashable(self): | ||
| asserthash((permissions.IsAuthenticated&permissions.IsAdminUser)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
May fail ifhash returns zero. The proper check would be that no exception is thrown. (E.g., via>= 0)
| filtered_permissions= [ | ||
| permforperm | ||
| indict.fromkeys(unfiltered_permissions) | ||
| ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
filtered_permissions = list(dict.fromkeys(unfiltered_permissions))
vanya909 commentedJun 16, 2024
@peterthomassen Should I open PR for these fixes? |
peterthomassen commentedJun 16, 2024
I don't think so; just trying to enable the community to learn from each other! :-) Thanks for the tests, I like how they are set up. |
Description
Provide tests for#9417 according tocomment