Message203509
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? |
|
Date |
User |
Action |
Args |
2013-11-20 17:09:42 | larry | set | recipients:
+ larry, rhettinger |
2013-11-20 17:09:42 | larry | set | messageid: <1384967382.38.0.811715737768.issue19664@psf.upfronthosting.co.za> |
2013-11-20 17:09:42 | larry | link | issue19664 messages |
2013-11-20 17:09:41 | larry | create | |
|