]> git.ipfire.org Git - thirdparty/jinja.git/commitdiff
add test and changelog 617/head
authorDavid Lord <davidism@gmail.com>
Fri, 7 Jul 2017 16:51:31 +0000 (09:51 -0700)
committerDavid Lord <davidism@gmail.com>
Fri, 7 Jul 2017 16:51:31 +0000 (09:51 -0700)
CHANGES
tests/test_imports.py

diff --git a/CHANGES b/CHANGES
index 500af4e4539a0078f945cc0a0f9dcaf6e7947cd7..aaae3ad85a624f882cd8c7e2eada2bbf147c0c45 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -28,11 +28,12 @@ Version 2.10
 - Add ``min`` and ``max`` filters. (`#475`_)
 - Add tests for all comparison operators: ``eq``, ``ne``, ``lt``, ``le``,
   ``gt``, ``ge``. (`#665`_)
-- ``import`` statement cannot end with a trailing comma. (`#618`_)
+- ``import`` statement cannot end with a trailing comma. (`#617`_, `#618`_)
 
 .. _#469: https://github.com/pallets/jinja/pull/469
 .. _#475: https://github.com/pallets/jinja/pull/475
 .. _#478: https://github.com/pallets/jinja/pull/478
+.. _#617: https://github.com/pallets/jinja/pull/617
 .. _#618: https://github.com/pallets/jinja/pull/618
 .. _#665: https://github.com/pallets/jinja/pull/665
 
index 4250eb9d048871aa08a2f69703137e527c9cbc8e..65aae43f20b228a26a11bdc682eb5512e3810a3b 100644 (file)
@@ -75,6 +75,12 @@ class TestImports(object):
         test_env.from_string('{% from "foo" import bar, with, context %}')
         test_env.from_string('{% from "foo" import bar, with with context %}')
 
+        with pytest.raises(TemplateSyntaxError):
+            test_env.from_string('{% from "foo" import bar,, with context %}')
+
+        with pytest.raises(TemplateSyntaxError):
+            test_env.from_string('{% from "foo" import bar with context, %}')
+
     def test_exports(self, test_env):
         m = test_env.from_string('''
             {% macro toplevel() %}...{% endmacro %}