aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_playlists.py18
-rw-r--r--test/test_utils.py5
-rw-r--r--test/test_write_info_json.py1
3 files changed, 24 insertions, 0 deletions
diff --git a/test/test_playlists.py b/test/test_playlists.py
index 00c950109..87ca401e5 100644
--- a/test/test_playlists.py
+++ b/test/test_playlists.py
@@ -16,6 +16,8 @@ from youtube_dl.extractor import (
DailymotionUserIE,
VimeoChannelIE,
VimeoUserIE,
+ VimeoAlbumIE,
+ VimeoGroupsIE,
UstreamChannelIE,
SoundcloudSetIE,
SoundcloudUserIE,
@@ -65,6 +67,22 @@ class TestPlaylists(unittest.TestCase):
self.assertEqual(result['title'], u'Nki')
self.assertTrue(len(result['entries']) > 65)
+ def test_vimeo_album(self):
+ dl = FakeYDL()
+ ie = VimeoAlbumIE(dl)
+ result = ie.extract('http://vimeo.com/album/2632481')
+ self.assertIsPlaylist(result)
+ self.assertEqual(result['title'], u'Staff Favorites: November 2013')
+ self.assertTrue(len(result['entries']) > 12)
+
+ def test_vimeo_groups(self):
+ dl = FakeYDL()
+ ie = VimeoGroupsIE(dl)
+ result = ie.extract('http://vimeo.com/groups/rolexawards')
+ self.assertIsPlaylist(result)
+ self.assertEqual(result['title'], u'Rolex Awards for Enterprise')
+ self.assertTrue(len(result['entries']) > 72)
+
def test_ustream_channel(self):
dl = FakeYDL()
ie = UstreamChannelIE(dl)
diff --git a/test/test_utils.py b/test/test_utils.py
index e9e590e74..0fa66beec 100644
--- a/test/test_utils.py
+++ b/test/test_utils.py
@@ -26,6 +26,7 @@ from youtube_dl.utils import (
unsmuggle_url,
shell_quote,
encodeFilename,
+ str_to_int,
)
if sys.version_info < (3, 0):
@@ -176,6 +177,10 @@ class TestUtil(unittest.TestCase):
args = ['ffmpeg', '-i', encodeFilename(u'ñ€ß\'.mp4')]
self.assertEqual(shell_quote(args), u"""ffmpeg -i 'ñ€ß'"'"'.mp4'""")
+ def test_str_to_int(self):
+ self.assertEqual(str_to_int('123,456'), 123456)
+ self.assertEqual(str_to_int('123.456'), 123456)
+
if __name__ == '__main__':
unittest.main()
diff --git a/test/test_write_info_json.py b/test/test_write_info_json.py
index d7177611b..90426a559 100644
--- a/test/test_write_info_json.py
+++ b/test/test_write_info_json.py
@@ -33,6 +33,7 @@ TEST_ID = 'BaW_jenozKc'
INFO_JSON_FILE = TEST_ID + '.info.json'
DESCRIPTION_FILE = TEST_ID + '.mp4.description'
EXPECTED_DESCRIPTION = u'''test chars: "'/\ä↭𝕐
+test URL: https://github.com/rg3/youtube-dl/issues/1892
This is a test video for youtube-dl.