#7303 closed (fixed)
tests/regressiontests/utils/datastructures.py: builtin dict ordering is assumed
Reported by: | Leo Soto M. | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | dev |
Severity: | Keywords: | jython | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
At the end of the doctest it says:
>>> real_dict.values() ['one', 'second-two']
Which fails on Jython because dict values have not the same ordering as in CPython.
Attached is a simple patch which uses ordered()
to keep the check for dict contents without assuming a default ordering.
Attachments (2)
Change History (6)
by , 17 years ago
Attachment: | avoid_checking_for_builtin_dict_order.patch added |
---|
comment:1 by , 17 years ago
by , 17 years ago
Attachment: | avoid_checking_for_builtin_dict_order.2.patch added |
---|
new version, doesn't use sorted
comment:2 by , 17 years ago
Right, sorted()
is not present on python2.3. I just uploaded a new patch.
comment:3 by , 16 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:4 by , 16 years ago
Regarding the sorted() issue - there are many other instances where sorted() is used; I've opened ticket #7718 to make sure they get fixed.
Note:
See TracTickets
for help on using tickets.
sorted() is a python2.5 function so this needs to do the inplace sort and then show the result.