diff options
author | Raymond Hettinger <python@rcn.com> | 2010-12-24 10:02:22 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2010-12-24 10:02:22 (GMT) |
commit | 93e233d6e5ef84b9e6d70917cdfe8ef1f9499cb5 (patch) | |
tree | 3c3859c8f70746ef6145613ae20b695f57f48e09 /Lib/unittest/test | |
parent | fca8beed4afaaae53549f4ca3fd43a1cfabc85d1 (diff) | |
download | cpython-93e233d6e5ef84b9e6d70917cdfe8ef1f9499cb5.zip cpython-93e233d6e5ef84b9e6d70917cdfe8ef1f9499cb5.tar.gz cpython-93e233d6e5ef84b9e6d70917cdfe8ef1f9499cb5.tar.bz2 |
Improve diff for assertCountEqual() to actually show the differing counts.
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'
Diffstat (limited to 'Lib/unittest/test')
-rw-r--r-- | Lib/unittest/test/test_assertions.py | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/Lib/unittest/test/test_assertions.py b/Lib/unittest/test/test_assertions.py index c81db24..e5dc9fa 100644 --- a/Lib/unittest/test/test_assertions.py +++ b/Lib/unittest/test/test_assertions.py @@ -229,12 +229,6 @@ class TestLongMessage(unittest.TestCase): "^Missing: 'key'$", "^Missing: 'key' : oops$"]) - def testassertCountEqual(self): - self.assertMessages('assertCountEqual', ([], [None]), - [r"\[None\]$", "^oops$", - r"\[None\]$", - r"\[None\] : oops$"]) - def testAssertMultiLineEqual(self): self.assertMessages('assertMultiLineEqual', ("", "foo"), [r"\+ foo$", "^oops$", |