From 40b4b691ee25f66920ef781a3b2631efcc1b2025 Mon Sep 17 00:00:00 2001 From: dirkf Date: Wed, 21 Feb 2024 11:18:37 +0000 Subject: [PATCH] Apply suggestions from code review --- test/test_download.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test_download.py b/test/test_download.py index e0cf7d1e2..eb8cfa1df 100644 --- a/test/test_download.py +++ b/test/test_download.py @@ -65,7 +65,7 @@ class YoutubeDL(youtube_dl.YoutubeDL): def _file_md5(fn, length=None): with open(fn, 'rb') as f: return hashlib.md5( - f.read(length) if length is not None else f.read()).hexdigest() + f.read() if length is None else f.read(length)).hexdigest() defs = gettestcases() @@ -94,7 +94,7 @@ class TestDownload(unittest.TestCase): def addTest(cls, test_method, test_method_name, add_ie): test_method.__name__ = str(test_method_name) test_method.add_ie = add_ie - setattr(TestDownload, test_method.__name__, test_method) + setattr(cls, test_method.__name__, test_method) del test_method def setUp(self):