diff options
author | David Parker <crazdave@gmail.com> | 2020-05-09 13:04:28 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2021-04-05 10:44:31 -0700 |
commit | 609bcb08312a844e88ff3239a0810c1ad36460d3 (patch) | |
tree | ef3b86f38d418b57140e78036b1477715261c562 /tests | |
parent | fd001b216a80a40cdc5c9afc6c863ed763095470 (diff) | |
download | jinja2-609bcb08312a844e88ff3239a0810c1ad36460d3.tar.gz |
Undefined.__contains__ raises UndefinedError
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_api.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/test_api.py b/tests/test_api.py index 4b6e0ae..5b21bcc 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -317,6 +317,7 @@ class TestUndefined: assert env.from_string("{{ foo.missing }}").render(foo=42) == "" assert env.from_string("{{ not missing }}").render() == "True" pytest.raises(UndefinedError, env.from_string("{{ missing - 1}}").render) + pytest.raises(UndefinedError, env.from_string("{{ 'foo' in missing }}").render) und1 = Undefined(name="x") und2 = Undefined(name="y") assert und1 == und2 |