X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=test%2Fhelper.py;h=01b11f6612dae53ae08bf397db89182c92ae4666;hb=191b7cbba95679b389a509420993af56ef51545d;hp=22d7638606841bc0250665402e09fb49655e5d89;hpb=9480d1a56674f95f135562d2133cbf12f6a96bbc;p=youtube-dl diff --git a/test/helper.py b/test/helper.py index 22d763860..01b11f661 100644 --- a/test/helper.py +++ b/test/helper.py @@ -102,7 +102,10 @@ 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), + 'Expected a %r object, but got %r' % (compat_str, type(got))) + 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)