[issue19664] UserDict test assumes ordered dict repr

2013-11-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset b62eb82ca5ef by Christian Heimes in branch 'default': Issue #19664: fix another flake test_userdict test http://hg.python.org/cpython/rev/b62eb82ca5ef -- ___ Python tracker

[issue19664] UserDict test assumes ordered dict repr

2013-11-21 Thread Christian Heimes
Christian Heimes added the comment: Thanks Serhiy! Your patch was simple yet elegant. :) -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker _

[issue19664] UserDict test assumes ordered dict repr

2013-11-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset a0ec33b83ba4 by Christian Heimes in branch 'default': Issue #19664: test_userdict's repr test no longer depends on the order http://hg.python.org/cpython/rev/a0ec33b83ba4 -- nosy: +python-dev ___ Python t

[issue19664] UserDict test assumes ordered dict repr

2013-11-21 Thread STINNER Victor
STINNER Victor added the comment: issue19664.patch looks good to me. Funny fact: test_repr() of test_dict only test dictionaries with 1 item :) -- ___ Python tracker ___ ___

[issue19664] UserDict test assumes ordered dict repr

2013-11-21 Thread Christian Heimes
Changes by Christian Heimes : -- nosy: +christian.heimes ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue19664] UserDict test assumes ordered dict repr

2013-11-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch for test_userdict. -- keywords: +patch nosy: +serhiy.storchaka Added file: http://bugs.python.org/file32759/issue19664.patch ___ Python tracker __

[issue19664] UserDict test assumes ordered dict repr

2013-11-21 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http

[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I don't know for sure--I haven't stepped through it--but here's an > informed guess. It relies on key collision. Ok, I see. The frequency of the errors then depends on the frequency of collisions for two fixed keys and a varying hash seed... --

[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread Larry Hastings
Larry Hastings added the comment: I don't know for sure--I haven't stepped through it--but here's an informed guess. It relies on key collision. The first dict is created the normal way. It contains two values, "one" (set to 1) and "two" (set to 2), inserted in that order. The second dict i

[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I realize this code is ancient--but it seems to rely on repr of a dict > producing consistent output, which is silly Well, it sounds a bit weird to me... If you're building the dict always in the same way, intuitively it should always produce the same repr()

[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread STINNER Victor
STINNER Victor added the comment: In test_set, I fixed the issue by parsing repr() output, sorting items and then compare sorted items :-) -- nosy: +haypo ___ Python tracker ___

[issue19664] UserDict test assumes ordered dict repr

2013-11-20 Thread Larry Hastings
New submission from Larry Hastings: If you run Lib/test/test_userdict.py enough times, sooner or later it'll produce a spurious error. I wrote a shell script that ran "./python -m test test_userdict" a zillion times; here's a snippet of output from running that script: [...] 1 test OK. [1/1]