aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-01-07 17:24:57 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-01-07 17:25:58 +0530
commit976ae3eabb4893f4768b381c6ba32e911303bc1c (patch)
tree039f52e9fcfe65ad600f3cd5552d2c97790ff231 /test
parentf0d785d3ed59e879a69f69f3c9334754f11747e0 (diff)
downloadhypervideo-pre-976ae3eabb4893f4768b381c6ba32e911303bc1c.tar.lz
hypervideo-pre-976ae3eabb4893f4768b381c6ba32e911303bc1c.tar.xz
hypervideo-pre-976ae3eabb4893f4768b381c6ba32e911303bc1c.zip
[youtube] Update tests
Diffstat (limited to 'test')
-rw-r--r--test/helper.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/helper.py b/test/helper.py
index 598f803f4..c9293f81a 100644
--- a/test/helper.py
+++ b/test/helper.py
@@ -224,6 +224,8 @@ def sanitize_got_info_dict(got_dict):
return f'md5:{md5(value)}'
elif isinstance(value, list) and len(value) > 10:
return f'count:{len(value)}'
+ elif key.endswith('_count') and isinstance(value, int):
+ return int
return value
test_info_dict = {
@@ -259,6 +261,8 @@ def expect_info_dict(self, got_dict, expected_dict):
def _repr(v):
if isinstance(v, compat_str):
return "'%s'" % v.replace('\\', '\\\\').replace("'", "\\'").replace('\n', '\\n')
+ elif isinstance(v, type):
+ return v.__name__
else:
return repr(v)
info_dict_str = ''