aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/test_download.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <[email protected]>2014-11-16 15:17:48 +0100
committerPhilipp Hagemeister <[email protected]>2014-11-16 15:17:48 +0100
commita0f59cdcb405b0556bff9884a7a82f3b808263dd (patch)
treeae0bc84ae1c8ad4e9c386fb611c7e1e000913ad2 /test/test_download.py
parenta4bc4336196c62bfc7e34046172c442108b19d55 (diff)
downloadyoutube-dl-a0f59cdcb405b0556bff9884a7a82f3b808263dd.tar.gz
youtube-dl-a0f59cdcb405b0556bff9884a7a82f3b808263dd.zip
[tests] Modernize
Diffstat (limited to 'test/test_download.py')
-rw-r--r--test/test_download.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test_download.py b/test/test_download.py
index 87aced97c..12cfb5cbe 100644
--- a/test/test_download.py
+++ b/test/test_download.py
@@ -1,5 +1,7 @@
#!/usr/bin/env python
+from __future__ import unicode_literals
+
# 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']) + '_' + str(i)
+ tname = 'test_%s_%d' % (test_case['name'], i)
i += 1
- test_method.__name__ = tname
+ test_method.__name__ = str(tname)
setattr(TestDownload, test_method.__name__, test_method)
del test_method