You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
676 B

  1. #!/usr/bin/env python
  2. import sys
  3. import unittest
  4. # Allow direct execution
  5. import os
  6. sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
  7. from youtube_dl.InfoExtractors import YoutubeIE, YoutubePlaylistIE
  8. class TestYoutubePlaylistMatching(unittest.TestCase):
  9. def test_playlist_matching(self):
  10. assert YoutubePlaylistIE().suitable(u'ECUl4u3cNGP61MdtwGTqZA0MreSaDybji8')
  11. assert YoutubePlaylistIE().suitable(u'PL63F0C78739B09958')
  12. assert not YoutubePlaylistIE().suitable(u'PLtS2H6bU1M')
  13. def test_youtube_matching(self):
  14. assert YoutubeIE().suitable(u'PLtS2H6bU1M')
  15. if __name__ == '__main__':
  16. unittest.main()