diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_YoutubeDL.py | 2 | ||||
-rw-r--r-- | test/test_update.py | 2 | ||||
-rw-r--r-- | test/test_utils.py | 2 |
3 files changed, 4 insertions, 2 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 8bff08314..0087cbc94 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -730,7 +730,7 @@ class TestYoutubeDL(unittest.TestCase): self.assertEqual(got_dict.get(info_field), expected, info_field) return True - test('%()j', (expect_same_infodict, str)) + test('%()j', (expect_same_infodict, None)) # NA placeholder NA_TEST_OUTTMPL = '%(uploader_date)s-%(width)d-%(x|def)s-%(id)s.%(ext)s' diff --git a/test/test_update.py b/test/test_update.py index a5a388c10..bc139562f 100644 --- a/test/test_update.py +++ b/test/test_update.py @@ -9,7 +9,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from test.helper import FakeYDL, report_warning -from yt_dlp.update import Updater, UpdateInfo +from yt_dlp.update import UpdateInfo, Updater # XXX: Keep in sync with yt_dlp.update.UPDATE_SOURCES diff --git a/test/test_utils.py b/test/test_utils.py index 6c8571f98..c3e387cd0 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -2110,6 +2110,8 @@ Line 1 self.assertEqual(traverse_obj(_TEST_DATA, (..., {str_or_none})), [item for item in map(str_or_none, _TEST_DATA.values()) if item is not None], msg='Function in set should be a transformation') + self.assertEqual(traverse_obj(_TEST_DATA, ('fail', {lambda _: 'const'})), 'const', + msg='Function in set should always be called') if __debug__: with self.assertRaises(Exception, msg='Sets with length != 1 should raise in debug'): traverse_obj(_TEST_DATA, set()) |