diff options
author | coletdjnz <coletdjnz@protonmail.com> | 2025-02-23 11:00:46 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-02-23 11:00:46 +1300 |
commit | 4445f37a7a66b248dbd8376c43137e6e441f138e (patch) | |
tree | b37561f1213bc25420f1f1004e8b6c8560e8b92f /test/test_YoutubeDL.py | |
parent | 3a1583ca75fb523cbad0e5e174387ea7b477d175 (diff) |
[core] Load plugins on demand (#11305)
- Adds `--no-plugin-dirs` to disable plugin loading
- `--plugin-dirs` now supports post-processors
Authored by: coletdjnz, Grub4K, pukkandan
Diffstat (limited to 'test/test_YoutubeDL.py')
-rw-r--r-- | test/test_YoutubeDL.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py index 17e081bc6..708a04f92 100644 --- a/test/test_YoutubeDL.py +++ b/test/test_YoutubeDL.py @@ -6,6 +6,8 @@ import sys import unittest from unittest.mock import patch +from yt_dlp.globals import all_plugins_loaded + sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) @@ -1427,6 +1429,12 @@ class TestYoutubeDL(unittest.TestCase): self.assertFalse(result.get('cookies'), msg='Cookies set in cookies field for wrong domain') self.assertFalse(ydl.cookiejar.get_cookie_header(fmt['url']), msg='Cookies set in cookiejar for wrong domain') + def test_load_plugins_compat(self): + # Should try to reload plugins if they haven't already been loaded + all_plugins_loaded.value = False + FakeYDL().close() + assert all_plugins_loaded.value + if __name__ == '__main__': unittest.main() |