diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_all_urls.py | 6 | ||||
-rw-r--r-- | test/test_playlists.py | 1 | ||||
-rw-r--r-- | test/test_utils.py | 4 |
3 files changed, 10 insertions, 1 deletions
diff --git a/test/test_all_urls.py b/test/test_all_urls.py index bea8c41fb..577f6ac32 100644 --- a/test/test_all_urls.py +++ b/test/test_all_urls.py @@ -157,5 +157,11 @@ class TestAllURLsMatching(unittest.TestCase): 'http://thedailyshow.cc.com/guests/michael-lewis/3efna8/exclusive---michael-lewis-extended-interview-pt--3', ['ComedyCentralShows']) + def test_yahoo_https(self): + # https://github.com/rg3/youtube-dl/issues/2701 + self.assertMatch( + 'https://screen.yahoo.com/smartwatches-latest-wearable-gadgets-163745379-cbs.html', + ['Yahoo']) + if __name__ == '__main__': unittest.main() diff --git a/test/test_playlists.py b/test/test_playlists.py index 5fb679aa1..75c6a6bbb 100644 --- a/test/test_playlists.py +++ b/test/test_playlists.py @@ -324,7 +324,6 @@ class TestPlaylists(unittest.TestCase): self.assertEqual(result['id'], '342759') self.assertEqual( result['title'], 'General Motors Ignition Switch Recall') - self.assertEqual(len(result['entries']), 9) whole_duration = sum(e['duration'] for e in result['entries']) self.assertEqual(whole_duration, 14855) diff --git a/test/test_utils.py b/test/test_utils.py index 2348c0415..51eb0b6b9 100644 --- a/test/test_utils.py +++ b/test/test_utils.py @@ -38,6 +38,7 @@ from youtube_dl.utils import ( xpath_with_ns, parse_iso8601, strip_jsonp, + uppercase_escape, ) if sys.version_info < (3, 0): @@ -279,6 +280,9 @@ class TestUtil(unittest.TestCase): d = json.loads(stripped) self.assertEqual(d, [{"id": "532cb", "x": 3}]) + def test_uppercase_escpae(self): + self.assertEqual(uppercase_escape(u'aä'), u'aä') + self.assertEqual(uppercase_escape(u'\\U0001d550'), u'𝕐') if __name__ == '__main__': unittest.main() |