diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py index 5f390d14d..ec9b371a9 100644 --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -532,7 +532,7 @@ def __mod__(self, var): else: msg = "Undefined template variable '%s'" % var if self.fail: - pytest.fail(msg, pytrace=False) + pytest.fail(msg) else: return msg diff --git a/tests/test_environment.py b/tests/test_environment.py index 6d48f0b82..dae490fee 100644 --- a/tests/test_environment.py +++ b/tests/test_environment.py @@ -97,7 +97,7 @@ def test_ignore(client): origin = "'invalid_template.html'" result.stdout.fnmatch_lines_random([ "tpkg/test_the_test.py F.", - "Undefined template variable 'invalid_var' in {}".format(origin) + "E * Failed: Undefined template variable 'invalid_var' in {}".format(origin) ])