• Raymond Hettinger's avatar
    Improve diff for assertCountEqual() to actually show the differing counts. · 93e233d6
    Raymond Hettinger yazdı
    New output looks like this:
    
    Traceback (most recent call last):
      File "test.py", line 5, in test_ce
        self.assertCountEqual('abracadabra xx', 'simsalabim xx')
    AssertionError: Element counts were not equal:
    Expected 5, got 2:  'a'
    Expected 2, got 1:  'b'
    Expected 0, got 2:  'i'
    Expected 0, got 2:  'm'
    Expected 0, got 1:  'l'
    Expected 0, got 2:  's'
    Expected 1, got 0:  'c'
    Expected 1, got 0:  'd'
    Expected 2, got 0:  'r'
    93e233d6
test_assertions.py 11.5 KB