Skip to content

Commit 760fb18

Browse files
committed
Do not hide traceback with failures from --fail-on-template-vars
Ref: #222 (comment)
1 parent 1b5ac2d commit 760fb18

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

pytest_django/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ def __mod__(self, var):
525525
else:
526526
msg = "Undefined template variable '%s'" % var
527527
if self.fail:
528-
pytest.fail(msg, pytrace=False)
528+
pytest.fail(msg)
529529
else:
530530
return msg
531531

tests/test_environment.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def test_ignore(client):
9797
origin = "'invalid_template.html'"
9898
result.stdout.fnmatch_lines_random([
9999
"tpkg/test_the_test.py F.",
100-
"Undefined template variable 'invalid_var' in {}".format(origin)
100+
"E * Failed: Undefined template variable 'invalid_var' in {}".format(origin)
101101
])
102102

103103

0 commit comments

Comments
 (0)