コード例 #1
0
ファイル: test_netrc.py プロジェクト: siikamiika/yt-dlc
 def test_netrc_present(self):
     for ie in gen_extractors():
         if not hasattr(ie, '_login'):
             continue
         self.assertTrue(
             hasattr(ie, '_NETRC_MACHINE'),
             'Extractor %s supports login, but is missing a _NETRC_MACHINE property' % ie.IE_NAME)
コード例 #2
0
ファイル: test_all_urls.py プロジェクト: zenerdi0de/yt-dlp
 def test_no_duplicates(self):
     ies = gen_extractors()
     for tc in gettestcases(include_onlymatching=True):
         url = tc['url']
         for ie in ies:
             if type(ie).__name__ in ('GenericIE', tc['name'] + 'IE'):
                 self.assertTrue(ie.suitable(url), '%s should match URL %r' % (type(ie).__name__, url))
             else:
                 self.assertFalse(
                     ie.suitable(url),
                     '%s should not match URL %r . That URL belongs to %s.' % (type(ie).__name__, url, tc['name']))
コード例 #3
0
 def test_no_duplicates(self):
     ies = gen_extractors()
     for tc in gettestcases(include_onlymatching=True):
         url = tc['url']
         for ie in ies:
             if type(ie).__name__ in ('GenericIE', tc['name'] + 'IE'):
                 self.assertTrue(ie.suitable(url), f'{type(ie).__name__} should match URL {url!r}')
             else:
                 self.assertFalse(
                     ie.suitable(url),
                     f'{type(ie).__name__} should not match URL {url!r} . That URL belongs to {tc["name"]}.')
コード例 #4
0
 def setUp(self):
     self.ies = gen_extractors()