Merge branch 'vgtv' of https://github.com/mrkolby/youtube-dl into mrkolby-vgtv
[youtube-dl] / test / helper.py
index 22d7638606841bc0250665402e09fb49655e5d89..7f3ab8438736485187f96464d6844080ac98c45f 100644 (file)
@@ -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)