projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[extractor/common] Move censorship checks to a separate method and add check for...
[youtube-dl]
/
test
/
test_compat.py
diff --git
a/test/test_compat.py
b/test/test_compat.py
index f5317ac3e24290d5aa73e12c7e490bfed72d6c21..d6c54e135810f9d03a970e3d261d64c70bf19530 100644
(file)
--- a/
test/test_compat.py
+++ b/
test/test_compat.py
@@
-27,11
+27,11
@@
from youtube_dl.compat import (
class TestCompat(unittest.TestCase):
def test_compat_getenv(self):
test_str = 'тест'
class TestCompat(unittest.TestCase):
def test_compat_getenv(self):
test_str = 'тест'
- compat_setenv('YOUTUBE
-DL-TEST
', test_str)
- self.assertEqual(compat_getenv('YOUTUBE
-DL-TEST
'), test_str)
+ compat_setenv('YOUTUBE
_DL_COMPAT_GETENV
', test_str)
+ self.assertEqual(compat_getenv('YOUTUBE
_DL_COMPAT_GETENV
'), test_str)
def test_compat_setenv(self):
def test_compat_setenv(self):
- test_var = 'YOUTUBE
-DL-TEST
'
+ test_var = 'YOUTUBE
_DL_COMPAT_SETENV
'
test_str = 'тест'
compat_setenv(test_var, test_str)
compat_getenv(test_var)
test_str = 'тест'
compat_setenv(test_var, test_str)
compat_getenv(test_var)
@@
-87,6
+87,8
@@
class TestCompat(unittest.TestCase):
def test_compat_shlex_split(self):
self.assertEqual(compat_shlex_split('-option "one two"'), ['-option', 'one two'])
def test_compat_shlex_split(self):
self.assertEqual(compat_shlex_split('-option "one two"'), ['-option', 'one two'])
+ self.assertEqual(compat_shlex_split('-option "one\ntwo" \n -flag'), ['-option', 'one\ntwo', '-flag'])
+ self.assertEqual(compat_shlex_split('-val 中文'), ['-val', '中文'])
def test_compat_etree_fromstring(self):
xml = '''
def test_compat_etree_fromstring(self):
xml = '''