+ def test_lazy_extractors(self):
+ try:
+ subprocess.check_call([sys.executable, 'devscripts/make_lazy_extractors.py', LAZY_EXTRACTORS],
+ cwd=rootDir, stdout=subprocess.DEVNULL)
+ self.assertTrue(os.path.exists(LAZY_EXTRACTORS))
+
+ _, stderr = self.run_yt_dlp(opts=('-s', 'test:'))
+ # `MIN_RECOMMENDED` emits a deprecated feature warning for deprecated Python versions
+ if stderr and stderr.startswith('Deprecated Feature: Support for Python'):
+ stderr = ''
+ self.assertFalse(stderr)
+
+ subprocess.check_call([sys.executable, 'test/test_all_urls.py'], cwd=rootDir, stdout=subprocess.DEVNULL)
+ finally:
+ with contextlib.suppress(OSError):
+ os.remove(LAZY_EXTRACTORS)
+