Lines Matching refs:test_env
12 def test_env(): function
27 def test_context_imports(self, test_env): argument
28 t = test_env.from_string('{% import "module" as m %}{{ m.test() }}')
30 t = test_env.from_string(
34 t = test_env.from_string(
38 t = test_env.from_string('{% from "module" import test %}{{ test() }}')
40 t = test_env.from_string(
44 t = test_env.from_string(
49 def test_import_needs_name(self, test_env): argument
50 test_env.from_string('{% from "foo" import bar %}')
51 test_env.from_string('{% from "foo" import bar, baz %}')
54 test_env.from_string('{% from "foo" import %}')
56 def test_no_trailing_comma(self, test_env): argument
58 test_env.from_string('{% from "foo" import bar, %}')
61 test_env.from_string('{% from "foo" import bar,, %}')
64 test_env.from_string('{% from "foo" import, %}')
66 def test_trailing_comma_with_context(self, test_env): argument
67 test_env.from_string('{% from "foo" import bar, baz with context %}')
68 test_env.from_string('{% from "foo" import bar, baz, with context %}')
69 test_env.from_string('{% from "foo" import bar, with context %}')
70 test_env.from_string('{% from "foo" import bar, with, context %}')
71 test_env.from_string('{% from "foo" import bar, with with context %}')
74 test_env.from_string('{% from "foo" import bar,, with context %}')
77 test_env.from_string('{% from "foo" import bar with context, %}')
79 def test_exports(self, test_env): argument
80 m = test_env.from_string(
95 def test_not_exported(self, test_env): argument
96 t = test_env.from_string("{% from 'module' import nothing %}{{ nothing() }}")
101 def test_import_with_globals(self, test_env): argument
117 def test_import_with_globals_override(self, test_env): argument
130 def test_from_import_with_globals(self, test_env): argument
144 def test_context_include(self, test_env): argument
145 t = test_env.from_string('{% include "header" %}')
147 t = test_env.from_string('{% include "header" with context %}')
149 t = test_env.from_string('{% include "header" without context %}')
152 def test_choice_includes(self, test_env): argument
153 t = test_env.from_string('{% include ["missing", "header"] %}')
156 t = test_env.from_string('{% include ["missing", "missing2"] ignore missing %}')
159 t = test_env.from_string('{% include ["missing", "missing2"] %}')
171 t = test_env.from_string('{% include ["missing", "header"] %}')
173 t = test_env.from_string("{% include x %}")
175 t = test_env.from_string('{% include [x, "header"] %}')
177 t = test_env.from_string("{% include x %}")
179 t = test_env.from_string("{% include [x] %}")
182 def test_include_ignoring_missing(self, test_env): argument
183 t = test_env.from_string('{% include "missing" %}')
186 t = test_env.from_string(
191 def test_context_include_with_overrides(self, test_env): argument
202 def test_unoptimized_scopes(self, test_env): argument
203 t = test_env.from_string(