[ie/vk] Improve format extraction (#9885)
[yt-dlp3.git] / test / test_netrc.py
blobdc708d974cf3e743aa45280bb7d5ba944b5b466d
1 #!/usr/bin/env python3
3 # Allow direct execution
4 import os
5 import sys
6 import unittest
8 sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
11 from yt_dlp.extractor import gen_extractor_classes
12 from yt_dlp.extractor.common import InfoExtractor
14 NO_LOGIN = InfoExtractor._perform_login
17 class TestNetRc(unittest.TestCase):
18 def test_netrc_present(self):
19 for ie in gen_extractor_classes():
20 if ie._perform_login is NO_LOGIN:
21 continue
22 self.assertTrue(
23 ie._NETRC_MACHINE,
24 'Extractor %s supports login, but is missing a _NETRC_MACHINE property' % ie.IE_NAME)
27 if __name__ == '__main__':
28 unittest.main()