[test_execution] Add test for lazy extractors (refs #28780)
authorSergey M․ <dstftw@gmail.com>
Tue, 20 Apr 2021 21:47:29 +0000 (04:47 +0700)
committerSergey M․ <dstftw@gmail.com>
Tue, 20 Apr 2021 21:47:29 +0000 (04:47 +0700)
test/test_execution.py

index 11661bb68148f4eb229b50c37f67dc744491c7df..32948d93e256a1568b7d05d63e6b2d142c543e04 100644 (file)
@@ -39,6 +39,16 @@ class TestExecution(unittest.TestCase):
         _, stderr = p.communicate()
         self.assertFalse(stderr)
 
+    def test_lazy_extractors(self):
+        try:
+            subprocess.check_call([sys.executable, 'devscripts/make_lazy_extractors.py', 'youtube_dl/extractor/lazy_extractors.py'], cwd=rootDir, stdout=_DEV_NULL)
+            subprocess.check_call([sys.executable, 'test/test_all_urls.py'], cwd=rootDir, stdout=_DEV_NULL)
+        finally:
+            try:
+                os.remove('youtube_dl/extractor/lazy_extractors.py')
+            except (IOError, OSError):
+                pass
+
 
 if __name__ == '__main__':
     unittest.main()