]>
Raphaël G. Git Repositories - youtubedl/blob - test/test_div.py
1 # -*- coding: utf-8 -*-
3 # Various small unit tests
6 sys
.path
.append(os
.path
.dirname(os
.path
.dirname(__file__
)))
10 def test_simplify_title():
11 assert youtube_dl
._simplify
_title
(u
'abc') == u
'abc'
12 assert youtube_dl
._simplify
_title
(u
'abc_d-e') == u
'abc_d-e'
14 assert youtube_dl
._simplify
_title
(u
'123') == u
'123'
16 assert u
'/' not in youtube_dl
._simplify
_title
(u
'abc/de')
17 assert u
'abc' in youtube_dl
._simplify
_title
(u
'abc/de')
18 assert u
'de' in youtube_dl
._simplify
_title
(u
'abc/de')
19 assert u
'/' not in youtube_dl
._simplify
_title
(u
'abc/de///')
21 assert u
'\\' not in youtube_dl
._simplify
_title
(u
'abc\\de')
22 assert u
'abc' in youtube_dl
._simplify
_title
(u
'abc\\de')
23 assert u
'de' in youtube_dl
._simplify
_title
(u
'abc\\de')
25 assert youtube_dl
._simplify
_title
(u
'ä') == u
'ä'
26 assert youtube_dl
._simplify
_title
(u
'кириллица') == u
'кириллица'
29 assert youtube_dl
._simplify
_title
(u
'\'a_') == u
'a'