#22338 closed Bug (fixed)
test_dict_translation seems to fails with Django 1.6.1, python 3.4 on Fedora
Reported by: | anonymous | Owned by: | nobody |
---|---|---|---|
Component: | Python 3 | Version: | 1.6 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
====================================================================== FAIL: test_dict_translation (utils_tests.test_datastructures.MultiValueDictTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builddir/build/BUILD/python3-python-django-1.6-1.fc21/tests/utils_tests/test_datastructures.py", line 283, in test_dict_translation self.assertEqual(list(six.iterkeys(d)), list(six.iterkeys(mvd))) AssertionError: Lists differ: ['pm', 'devs'] != ['devs', 'pm'] First differing element 0: pm devs - ['pm', 'devs'] + ['devs', 'pm'] ----------------------------------------------------------------------
Full build log: http://mstuchli.fedorapeople.org/build.log
Change History (8)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
I don't get the same error on 1.7.x, replacing list
with sorted
solves the issue on 1.6.1 and I do agree with your analysis. :)
comment:3 by , 11 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Hm, ok, if there is no problem on 1.7, then I guess this is just a "won't fix" on the 1.6 branch.
comment:4 by , 11 years ago
Isn't this still a bug in the test suite, though? If, as you say, the order of iteration is undefined, it may very well fail again should the implementation change, so it seems to me that using sorted
is just the correct thing to do.
comment:5 by , 11 years ago
Resolution: | wontfix |
---|---|
Status: | closed → new |
Triage Stage: | Unreviewed → Accepted |
Yes, okay, I see this error on our CI server right now.
comment:6 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I don't think 1.6 is going to support 3.4. Do you get the same error on master and/or 1.7? I can't reproduce it with Python 3.4.0 on any of those branches, but I imagine it probably has to do with undefined ordering of dictionary key iteration and could be fixed by changing
list
tosorted
in the assertion.