From 94a55a5547fa6240709793a77d8fee357f7f23a5 Mon Sep 17 00:00:00 2001 From: InvalidUsernameException Date: Mon, 9 Jun 2025 19:42:16 +0200 Subject: [PATCH] Remove dead-code assertion for `playlist_duration_sum` There are no current usages, which can be verified with git grep playlist_duration_sum The last usage was removed in 92dcba1e1cc411eecb64792e78ad8f3b125691c8, as per git log -S playlist_duration_sum -p That commit was made over 10 years ago and it seems unlikely than a test inside a plugin would make use of this special-case assertion. So I think it is worth removing. --- test/test_download.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/test_download.py b/test/test_download.py index 918d2c5f9..2cdcdfa91 100755 --- a/test/test_download.py +++ b/test/test_download.py @@ -212,10 +212,6 @@ def try_rm_tcs_files(tcs=None): self, len(res_dict['entries']), test_case['playlist_maxcount'], f'Expected at most {test_case["playlist_maxcount"]} entries ' f'in playlist {test_case["url"]}, but got {len(res_dict["entries"])}') - if 'playlist_duration_sum' in test_case: - got_duration = sum(e['duration'] for e in res_dict['entries']) - self.assertEqual( - test_case['playlist_duration_sum'], got_duration) # Generalize both playlists and single videos to unified format for # simplicity