projects
/
youtube-dl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[tests] Modernize
[youtube-dl]
/
test
/
test_download.py
diff --git
a/test/test_download.py
b/test/test_download.py
index 87aced97cfe6e25750183e2fd94d4c2392703d9b..12cfb5cbe49dde5468b8b773f85cfbbb331d8eb8 100644
(file)
--- a/
test/test_download.py
+++ b/
test/test_download.py
@@
-1,5
+1,7
@@
#!/usr/bin/env python
#!/usr/bin/env python
+from __future__ import unicode_literals
+
# Allow direct execution
import os
import sys
# Allow direct execution
import os
import sys
@@
-210,9
+212,9
@@
for n, test_case in enumerate(defs):
tname = 'test_' + str(test_case['name'])
i = 1
while hasattr(TestDownload, tname):
tname = 'test_' + str(test_case['name'])
i = 1
while hasattr(TestDownload, tname):
- tname = 'test_
' + str(test_case['name']) + '_' + str(
i)
+ tname = 'test_
%s_%d' % (test_case['name'],
i)
i += 1
i += 1
- test_method.__name__ =
tname
+ test_method.__name__ =
str(tname)
setattr(TestDownload, test_method.__name__, test_method)
del test_method
setattr(TestDownload, test_method.__name__, test_method)
del test_method