aboutsummaryrefslogtreecommitdiff
path: root/test/test_YoutubeDL.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_YoutubeDL.py')
-rw-r--r--test/test_YoutubeDL.py8
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()