0
0
Fork 0

[test/helper] Clarify field for list length mismatch

main
Sergey M․ 2015-09-30 20:31:29 +06:00
parent 386a7b52d5
commit f88f1b40ce
1 changed files with 2 additions and 1 deletions

View File

@ -128,7 +128,8 @@ def expect_value(self, got, expected, field):
elif isinstance(expected, list) and isinstance(got, list):
self.assertEqual(
len(expected), len(got),
'Expect a list of length %d, but got a list of length %d' % (len(expected), len(got)))
'Expect a list of length %d, but got a list of length %d for field %s' % (
len(expected), len(got), field))
for index, (item_got, item_expected) in enumerate(zip(got, expected)):
type_got = type(item_got)
type_expected = type(item_expected)