From a0f59cdcb405b0556bff9884a7a82f3b808263dd Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Sun, 16 Nov 2014 15:17:48 +0100 Subject: [tests] Modernize --- test/test_download.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'test/test_download.py') 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 -- cgit v1.2.3