Skip to content

Commit

Permalink
Do some prints during the test, so we can see what exactly fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
miracle2k committed May 31, 2010
1 parent 50ecc20 commit 77becf2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_defaultags.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,14 @@ def test_url():
('{% url urls_app.views.index as url %}{{url}}', {}, '/url_test/'),
('{% url inexistent as url %}{{ url }}', {}, ''), # no exception
):
print template, '==', expected_result
try:
actual_result = env.from_string(template).render(context)
except Exception, e:
print '==> %s: (%s)' % (type(e), e)
assert type(e) == expected_result
else:
print '==> %s' % actual_result
assert actual_result == expected_result


Expand Down

0 comments on commit 77becf2

Please sign in to comment.