[compat] Update test_compat
authordirkf <fieldhouse@gmx.net>
Mon, 6 Feb 2023 15:50:28 +0000 (15:50 +0000)
committerdirkf <fieldhouse@gmx.net>
Mon, 13 Feb 2023 03:54:51 +0000 (03:54 +0000)
[skip ci]

test/test_compat.py

index 4dddd9a38d55104355a04ba8f9fc961c1f924ab7..e233b1ae1b7d194692e9bf890fa91afa48df3b2e 100644 (file)
@@ -50,9 +50,9 @@ class TestCompat(unittest.TestCase):
         import youtube_dl.compat
         all_names = sorted(
             youtube_dl.compat.__all__ + youtube_dl.compat.legacy)
-        present_names = set(filter(
+        present_names = set(map(compat_str, filter(
             lambda c: '_' in c and not c.startswith('_'),
-            dir(youtube_dl.compat))) - set(['unicode_literals'])
+            dir(youtube_dl.compat)))) - set(['unicode_literals'])
         self.assertEqual(all_names, sorted(present_names))
 
     def test_compat_urllib_parse_unquote(self):