projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Provide guidance when called with a YouTube ID starting with a dash.
[youtube-dl]
/
test
/
test_utils.py
diff --git
a/test/test_utils.py
b/test/test_utils.py
index 0fa8731473317577f6ef7534d9ad5ead2064e32b..9a62322f019b9a05ec0ff38ee4d31815eb921eef 100644
(file)
--- a/
test/test_utils.py
+++ b/
test/test_utils.py
@@
-47,6
+47,7
@@
from youtube_dl.utils import (
js_to_json,
get_filesystem_encoding,
intlist_to_bytes,
js_to_json,
get_filesystem_encoding,
intlist_to_bytes,
+ args_to_str,
)
)
@@
-361,5
+362,11
@@
class TestUtil(unittest.TestCase):
intlist_to_bytes([0, 1, 127, 128, 255]),
b'\x00\x01\x7f\x80\xff')
intlist_to_bytes([0, 1, 127, 128, 255]),
b'\x00\x01\x7f\x80\xff')
+ def test_args_to_str(self):
+ self.assertEqual(
+ args_to_str(['foo', 'ba/r', '-baz', '2 be', '']),
+ 'foo ba/r -baz \'2 be\' \'\''
+ )
+
if __name__ == '__main__':
unittest.main()
if __name__ == '__main__':
unittest.main()