From 4a5a21d10c610339ea2ed7bc1732b6e66cf296ff Mon Sep 17 00:00:00 2001 From: Gary Wilson Jr Date: Mon, 30 Mar 2009 16:08:57 +0000 Subject: [PATCH] [1.0.X]: Made the template tests error output a bit more pretty. Backport of r10191 from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@10192 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/regressiontests/templates/tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/regressiontests/templates/tests.py b/tests/regressiontests/templates/tests.py index d5eb8aa083..08e7e5906e 100644 --- a/tests/regressiontests/templates/tests.py +++ b/tests/regressiontests/templates/tests.py @@ -225,7 +225,8 @@ class Templates(unittest.TestCase): settings.TEMPLATE_DEBUG = old_td settings.TEMPLATE_STRING_IF_INVALID = old_invalid - self.assertEqual(failures, [], ('-'*70 + '\n').join(failures)) + self.assertEqual(failures, [], "Tests failed:\n%s\n%s" % + ('-'*70, ("\n%s\n" % ('-'*70)).join(failures))) def render(self, test_template, vals): return test_template.render(template.Context(vals[1]))