aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSergey M․ <dstftw@gmail.com>2016-10-31 23:32:08 +0700
committerSergey M․ <dstftw@gmail.com>2016-10-31 23:32:08 +0700
commite5a088dc4be4fdcc96927a9f1b7284d4cd49c415 (patch)
tree825b69d75fc0cbd509c8b73a9ae74ecadb9c177e /test
parent2c6da7df4a4d69ec933688e3c53795fd3436a1c6 (diff)
[utils] Fix --match-filter for int-like strings (closes #11082)
Diffstat (limited to 'test')
-rw-r--r--test/test_YoutubeDL.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/test_YoutubeDL.py b/test/test_YoutubeDL.py
index 0dfe25c00..8bf00bea9 100644
--- a/test/test_YoutubeDL.py
+++ b/test/test_YoutubeDL.py
@@ -605,6 +605,7 @@ class TestYoutubeDL(unittest.TestCase):
'extractor': 'TEST',
'duration': 30,
'filesize': 10 * 1024,
+ 'playlist_id': '42',
}
second = {
'id': '2',
@@ -614,6 +615,7 @@ class TestYoutubeDL(unittest.TestCase):
'duration': 10,
'description': 'foo',
'filesize': 5 * 1024,
+ 'playlist_id': '43',
}
videos = [first, second]
@@ -650,6 +652,10 @@ class TestYoutubeDL(unittest.TestCase):
res = get_videos(f)
self.assertEqual(res, ['1'])
+ f = match_filter_func('playlist_id = 42')
+ res = get_videos(f)
+ self.assertEqual(res, ['1'])
+
def test_playlist_items_selection(self):
entries = [{
'id': compat_str(i),