diff options
author | Alex Mykyta <amykyta3@users.noreply.github.com> | 2020-03-10 20:57:28 -0700 |
---|---|---|
committer | David Lord <davidism@gmail.com> | 2021-04-05 10:35:57 -0700 |
commit | 2e0a3da2bc8b764dc8cb5aec390cc7ac7dacd8ae (patch) | |
tree | a387deadf03ef2ebd43bb22e3ad16de776294ca5 /tests | |
parent | 1eb871fdc32cb90db54700281dd6f4b7aa9a4cad (diff) | |
download | jinja2-2e0a3da2bc8b764dc8cb5aec390cc7ac7dacd8ae.tar.gz |
parse hex, octal, and binary integer literals
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_lexnparse.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_lexnparse.py b/tests/test_lexnparse.py index f485766..c02adad 100644 --- a/tests/test_lexnparse.py +++ b/tests/test_lexnparse.py @@ -412,6 +412,13 @@ class TestSyntax: ("2.5e+100", "2.5e+100"), ("25.6e-10", "2.56e-09"), ("1_2.3_4e5_6", "1.234e+57"), + ("0", "0"), + ("0_00", "0"), + ("0b1001_1111", "159"), + ("0o123", "83"), + ("0o1_23", "83"), + ("0x123abc", "1194684"), + ("0x12_3abc", "1194684"), ), ) def test_numeric_literal(self, env, value, expect): |