diff options
Diffstat (limited to 'test/test_div.py')
-rw-r--r-- | test/test_div.py | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/test/test_div.py b/test/test_div.py index 367780ed3..4525c8be6 100644 --- a/test/test_div.py +++ b/test/test_div.py @@ -8,14 +8,21 @@ sys.path.append(os.path.dirname(os.path.dirname(__file__))) import youtube_dl def test_simplify_title(): - assert youtube_dl._simplify_title('abc') == 'abc' - assert youtube_dl._simplify_title('abc_d-e') == 'abc_d-e' + assert youtube_dl._simplify_title(u'abc') == u'abc' + assert youtube_dl._simplify_title(u'abc_d-e') == u'abc_d-e' - assert '/' not in youtube_dl._simplify_title('abc/de') - assert 'abc' in youtube_dl._simplify_title('abc/de') - assert 'de' in youtube_dl._simplify_title('abc/de') + assert youtube_dl._simplify_title(u'123') == u'123' - assert '\\' not in youtube_dl._simplify_title('abc\\de') - assert 'abc' in youtube_dl._simplify_title('abc\\de') - assert 'de' in youtube_dl._simplify_title('abc\\de') + assert u'/' not in youtube_dl._simplify_title(u'abc/de') + assert u'abc' in youtube_dl._simplify_title(u'abc/de') + assert u'de' in youtube_dl._simplify_title(u'abc/de') + assert u'\\' not in youtube_dl._simplify_title(u'abc\\de') + assert u'abc' in youtube_dl._simplify_title(u'abc\\de') + assert u'de' in youtube_dl._simplify_title(u'abc\\de') + + # TODO: Fix #220 + #assert youtube_dl._simplify_title(u'ä') == u'ä' + + # Strip underlines + assert youtube_dl._simplify_title(u'\'a_') == u'a' |