1
0
Fork 0
mirror of https://github.com/ytdl-org/youtube-dl.git synced 2024-05-19 11:39:28 +00:00

Apply suggestions from code review

This commit is contained in:
dirkf 2024-02-21 11:18:37 +00:00 committed by GitHub
parent 14297874f1
commit 40b4b691ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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):