﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	launchpad_bug
2736	test_numdict fails: repr is not sorted	warner	Brian Warner <warner@…>	"While setting up a windows unit test machine on Appveyor (#2344), I saw a consistent unit test failure:

{{{
[FAIL] 
Traceback (most recent call last):
  File ""C:\projects\tahoe-lafs\.tox\py\lib\site-packages\allmydata\test\test_util.py"", line 1356, in test_numdict
    self.failUnlessEqual(repr(d), ""{'a': 1, 'b': 2}"")
  File ""C:\projects\tahoe-lafs\.tox\py\lib\site-packages\twisted\trial\_synctest.py"", line 437, in assertEqual
    super(_Assertions, self).assertEqual(first, second, msg)
  File ""C:\Python27-x64\Lib\unittest\case.py"", line 513, in assertEqual
    assertion_func(first, second, msg=msg)
  File ""C:\Python27-x64\Lib\unittest\case.py"", line 506, in _baseAssertEqual
    raise self.failureException(msg)
twisted.trial.unittest.FailTest: ""{'b': 2, 'a': 1}"" != ""{'a': 1, 'b': 2}""
 
allmydata.test.test_util.DictUtil.test_numdict
}}}

It looks like this test is inappropriately requiring that the repr of a `dictutil.NumDict` is sorted, when the implementation delegates `__repr__` directly to the underlying (normal) dictionary, which of course makes no guarantees about ordering.

I think that assertion should just be deleted, but maybe you want to change the implementation to provide a stable repr instead. Or maybe we should delete `NumDict`.. it only appears to be used in one obscure logging tool.
"	defect	closed	normal	1.11.0	code	1.10.2	fixed			
