]> Devi Nivas Git - chevron.git/commitdiff
Fix python 2.6 failing
authornoah morrison <noah@morrison.ph>
Wed, 19 Nov 2014 03:42:19 +0000 (22:42 -0500)
committernoah morrison <noah@morrison.ph>
Wed, 19 Nov 2014 03:56:48 +0000 (22:56 -0500)
Thanks travis!

test_spec.py

index 69f9517cb4c417346651fb23eb98b2522b7f1dc3..e5c88106306ca8745ea18bde28c467bf44d8f93c 100755 (executable)
@@ -27,8 +27,8 @@ def _test_case_from_path(json_path):
 
                 self.assertEqual(result, obj['expected'])
 
-            test_case.__doc__ = 'suite: {}    desc: {}'.format(spec,
-                                                               obj['desc'])
+            test_case.__doc__ = 'suite: {0}    desc: {1}'.format(spec,
+                                                                 obj['desc'])
             return test_case
 
         with open(json_path, 'r') as f:
@@ -36,7 +36,7 @@ def _test_case_from_path(json_path):
 
         # Generates a unit test for each test object
         for i, test in enumerate(yaml['tests']):
-            vars()['test_%s' % i] = _test_from_object(test)
+            vars()['test_' + str(i)] = _test_from_object(test)
 
     # Return the built class
     return MustacheTestCase