]> Devi Nivas Git - chevron.git/commitdiff
Made unit tests more descriptive
authornoah morrison <noah@morrison.ph>
Sat, 1 Nov 2014 20:33:14 +0000 (16:33 -0400)
committernoah morrison <noah@morrison.ph>
Sat, 1 Nov 2014 20:33:14 +0000 (16:33 -0400)
test_spec.py

index 661c5ce17ae753a233222d33a60b5333c3f67020..484cf73ca686f663d44f9965cf17f5028c4a2c92 100755 (executable)
@@ -16,9 +16,9 @@ def _test_case_from_path(json_path):
         def _test_from_object(obj):
             """Generate a unit test from a test object"""
             def test_case(self):
-                """A simple test case"""
                 self.assertEqual(STACHE(obj['template'], obj['data']),
                                  obj['expected'])
+            test_case.__doc__ = 'suite: {}    desc: {}'.format(spec, obj['desc'])
             return test_case
         with open(json_path, 'r') as f:
             yaml = json.load(f)