deepdiff
deepdiff copied to clipboard
tests: handle difference in Enum hashes with Python 3.11
With Python 3.11, Enum members have a _sort_order
attribute
that shows up in the hashes. Update the tests to pass if it's
present (but also still if it's not present, so we still
support Python 3.10 and earlier).
Signed-off-by: Adam Williamson [email protected]
Codecov Report
Merging #327 (31b4d4f) into master (81341e2) will not change coverage. The diff coverage is
n/a
.
@@ Coverage Diff @@
## master #327 +/- ##
=======================================
Coverage 99.53% 99.53%
=======================================
Files 14 14
Lines 2998 2998
=======================================
Hits 2984 2984
Misses 14 14
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 81341e2...31b4d4f. Read the comment docs.
Hi @AdamWill
Thanks for the PR. Do you think we should just ignore _sort_order_
, _name_
, and _value_
for enums?
I don't know, honestly. I'm just going round trying to clean up things in Fedora that didn't build with Python 3.11, and this was one of them. I don't know enough about the details of what deepdiff wants to do to know if that's the right thing to do. Sorry.
Hi @AdamWill
Sorry it took a while to get back to you. I decided it might be cleaner to ignore the _name_
, _value_
, and _sort_order_
for Enums. I'm closing this PR since it will be addressed in a new PR I'm opening now. Thanks again for bringing this issue to my attention.