Skip to content

Commit 022e20f

Browse files
blueyeddulacp
authored andcommitted
Do not hide traceback with failures from --fail-on-template-vars
Ref: #222 (comment)
1 parent 7896631 commit 022e20f

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
@@ -532,7 +532,7 @@ def __mod__(self, var):
532532
else:
533533
msg = "Undefined template variable '%s'" % var
534534
if self.fail:
535-
pytest.fail(msg, pytrace=False)
535+
pytest.fail(msg)
536536
else:
537537
return msg
538538

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)