1
0
mirror of https://github.com/yt-dlp/yt-dlp synced 2025-06-30 11:02:54 -05:00

[cleanup] Misc cleanup and refactor (#2173)

This commit is contained in:
pukkandan
2022-04-18 02:28:28 +05:30
parent b6dc37fe2a
commit 19a0394044
31 changed files with 263 additions and 345 deletions

View File

@ -1,5 +1,6 @@
#!/usr/bin/env python3
# Allow direct execution
import contextlib
import os
import sys
import unittest
@ -127,11 +128,9 @@ class TestSignature(unittest.TestCase):
os.mkdir(self.TESTDATA_DIR)
def tearDown(self):
try:
with contextlib.suppress(OSError):
for f in os.listdir(self.TESTDATA_DIR):
os.remove(f)
except OSError:
pass
def t_factory(name, sig_func, url_pattern):