X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=test%2Fhelper.py;h=7f3ab8438736485187f96464d6844080ac98c45f;hb=cc7fec5818254f4679896823c7de9d17f50201ca;hp=22d7638606841bc0250665402e09fb49655e5d89;hpb=c71dfccc98208be44b1f639af72a257dae34d966;p=youtube-dl diff --git a/test/helper.py b/test/helper.py index 22d763860..7f3ab8438 100644 --- a/test/helper.py +++ b/test/helper.py @@ -102,7 +102,11 @@ def expect_info_dict(self, expected_dict, got_dict): match_rex = re.compile(match_str) self.assertTrue( - isinstance(got, compat_str) and match_rex.match(got), + isinstance(got, compat_str), + u'Expected a %s object, but got %s for field %s' % ( + compat_str.__name__, type(got).__name__, info_field)) + self.assertTrue( + match_rex.match(got), u'field %s (value: %r) should match %r' % (info_field, got, match_str)) elif isinstance(expected, type): got = got_dict.get(info_field)