1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-06-27 17:08:32 +00:00

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 92dcba1e1c,
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.
This commit is contained in:
InvalidUsernameException 2025-06-09 19:42:16 +02:00
parent fffdc7480e
commit 94a55a5547

View File

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