This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author larry
Recipients larry, rhettinger
Date 2013-11-20.17:09:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za>
In-reply-to
Content
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] test_userdict
1 test OK.
[1/1] test_userdict
1 test OK.
[1/1] test_userdict
test test_userdict failed -- Traceback (most recent call last):
  File "/home/larry/src/python/clinic/Lib/test/test_userdict.py", line 48, in test_all
    self.assertEqual(repr(u2), repr(d2))
AssertionError: "{'one': 1, 'two': 2}" != "{'two': 2, 'one': 1}"
- {'one': 1, 'two': 2}
+ {'two': 2, 'one': 1}


1 test failed:
    test_userdict
[1/1] test_userdict
1 test OK.
[1/1] test_userdict
1 test OK.
[...]

Line 48 reads as follows:
    self.assertEqual(repr(u2), repr(d2))

I realize this code is ancient--but it seems to rely on repr of a dict producing consistent output, which is silly and has always been wrong.

Raymond, you want to take this?
History
Date User Action Args
2013-11-20 17:09:42larrysetrecipients: + larry, rhettinger
2013-11-20 17:09:42larrysetmessageid: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za>
2013-11-20 17:09:42larrylinkissue19664 messages
2013-11-20 17:09:41larrycreate