summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMartin Krizek <martin.krizek@gmail.com>2021-11-09 17:15:31 +0100
committerDavid Lord <davidism@gmail.com>2021-11-09 08:41:02 -0800
commitbb0db82b91e2842e900fd731acb9de7fab1d72ce (patch)
tree95d7c4ecb4c25c3f9b39d7aa4336e79b39e72d43 /tests
parenta4e2532489f804996be36ae32c25a69298bd1106 (diff)
downloadjinja2-bb0db82b91e2842e900fd731acb9de7fab1d72ce.tar.gz
native: keep same behavior on Python 3.10
Diffstat (limited to 'tests')
-rw-r--r--tests/test_nativetypes.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/test_nativetypes.py b/tests/test_nativetypes.py
index 2258181..9bae938 100644
--- a/tests/test_nativetypes.py
+++ b/tests/test_nativetypes.py
@@ -147,3 +147,9 @@ def test_no_intermediate_eval(env):
def test_spontaneous_env():
t = NativeTemplate("{{ true }}")
assert isinstance(t.environment, NativeEnvironment)
+
+
+def test_leading_spaces(env):
+ t = env.from_string(" {{ True }}")
+ result = t.render()
+ assert result == " True"