]>
Commit | Line | Data |
---|---|---|
499bfcbf PH |
1 | import os |
2 | import sys | |
3 | import unittest | |
f8271158 | 4 | |
499bfcbf PH |
5 | sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
6 | ||
7 | ||
52efa4b3 | 8 | from yt_dlp.extractor import gen_extractor_classes |
9 | from yt_dlp.extractor.common import InfoExtractor | |
10 | ||
11 | NO_LOGIN = InfoExtractor._perform_login | |
499bfcbf PH |
12 | |
13 | ||
14 | class TestNetRc(unittest.TestCase): | |
15 | def test_netrc_present(self): | |
52efa4b3 | 16 | for ie in gen_extractor_classes(): |
17 | if ie._perform_login is NO_LOGIN: | |
499bfcbf PH |
18 | continue |
19 | self.assertTrue( | |
52efa4b3 | 20 | ie._NETRC_MACHINE, |
499bfcbf PH |
21 | 'Extractor %s supports login, but is missing a _NETRC_MACHINE property' % ie.IE_NAME) |
22 | ||
23 | ||
24 | if __name__ == '__main__': | |
25 | unittest.main() |