]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
Add test for Template.get_corresponding_lineno()
authorMr. Senko <atodorov@mrsenko.com>
Sun, 29 Jan 2017 11:19:07 +0000 (13:19 +0200)
committerMr. Senko <atodorov@mrsenko.com>
Sun, 29 Jan 2017 11:29:00 +0000 (13:29 +0200)
this currently breaks with an exception inside Jinja

tests/test_debug.py

index a15852449c0197dbad60206a8efbc1e7a08f33d1..9a6fbb5a477fdfbf7f4df4fc3e8934269ece78ac 100644 (file)
@@ -82,3 +82,7 @@ ZeroDivisionError: (int(eger)? )?division (or modulo )?by zero
             'l_0_baz': missing,
         })
         assert locals == {'foo': 13, 'bar': 99}
+
+    def test_get_corresponding_lineno_traceback(self, fs_env):
+        tmpl = fs_env.get_template('test.html')
+        assert tmpl.get_corresponding_lineno(1) == 1