mirror of
https://github.com/ytdl-org/youtube-dl.git
synced 2024-12-27 15:20:29 +00:00
[test/helper] Clarify field for list length mismatch
This commit is contained in:
parent
386a7b52d5
commit
f88f1b40ce
@ -128,7 +128,8 @@ def expect_value(self, got, expected, field):
|
|||||||
elif isinstance(expected, list) and isinstance(got, list):
|
elif isinstance(expected, list) and isinstance(got, list):
|
||||||
self.assertEqual(
|
self.assertEqual(
|
||||||
len(expected), len(got),
|
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)):
|
for index, (item_got, item_expected) in enumerate(zip(got, expected)):
|
||||||
type_got = type(item_got)
|
type_got = type(item_got)
|
||||||
type_expected = type(item_expected)
|
type_expected = type(item_expected)
|
||||||
|
Loading…
Reference in New Issue
Block a user