mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
The unittest.TestCase.assertEqual() now displays the differences in lists,
tuples, dicts and sets on failure. Many new handy type and comparison specific assert* methods have been added that fail with error messages actually useful for debugging. Contributed in by Google and completed with help from mfoord and GvR at PyCon 2009 sprints. Discussion lives in http://bugs.python.org/issue2578.
This commit is contained in:
parent
c2784229b8
commit
2839985c7e
6 changed files with 1081 additions and 92 deletions
|
@ -227,6 +227,7 @@ class StructTest(unittest.TestCase):
|
|||
BUGGY_RANGE_CHECK = "bBhHiIlL"
|
||||
|
||||
def __init__(self, formatpair, bytesize):
|
||||
super(IntTester, self).__init__(methodName='test_one')
|
||||
self.assertEqual(len(formatpair), 2)
|
||||
self.formatpair = formatpair
|
||||
for direction in "<>!=":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue