Skip to content

Commit f11e4a1

Browse files
blueyedtimb07
authored andcommitted
Do not hide traceback with failures from --fail-on-template-vars
Ref: #222 (comment)
1 parent 805e258 commit f11e4a1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pytest_django/plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ def __mod__(self, var):
573573
else:
574574
msg = "Undefined template variable '%s'" % var
575575
if self.fail:
576-
pytest.fail(msg, pytrace=False)
576+
pytest.fail(msg)
577577
else:
578578
return msg
579579

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)