From 573999353a2ba0059a2cb6233f5a9cc9ab5c3bf2 Mon Sep 17 00:00:00 2001 From: z80 Date: Wed, 8 Nov 2023 19:55:21 -0500 Subject: [PATCH] feat: add tests confirming underscore sep --- examples/wallet/wallet.vy | 2 +- tests/grammar/test_grammar.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/examples/wallet/wallet.vy b/examples/wallet/wallet.vy index 5fd5229136..31996feafc 100644 --- a/examples/wallet/wallet.vy +++ b/examples/wallet/wallet.vy @@ -58,7 +58,7 @@ def approve(_seq: int128, to: address, _value: uint256, data: Bytes[4096], sigda # Increase the number of approved transactions by 1 self.seq += 1 # Use raw_call to send the transaction - return raw_call(to, data, max_outsize=4096, gas=3000000, value=_value) + return raw_call(to, data, max_outsize=4096, gas=3_000_000, value=_value) @external diff --git a/tests/grammar/test_grammar.py b/tests/grammar/test_grammar.py index aa0286cfa5..b828d28e43 100644 --- a/tests/grammar/test_grammar.py +++ b/tests/grammar/test_grammar.py @@ -22,6 +22,11 @@ def test_basic_grammar(): def one_two_three() -> uint256: return 123123123 """ + code_nums = """ + x: constant(uint256) = 100_000 + y: constant(uint256) = 0o100_000 + z: constant(decimal) = 1.100_000_007 + """ assert parse_vyper_source(code, dedent=True) assert parse_to_ast(textwrap.dedent(code)) @@ -29,6 +34,9 @@ def one_two_three() -> uint256: assert parse_vyper_source(code_func, dedent=True) assert parse_to_ast(textwrap.dedent(code_func)) + assert parse_vyper_source(code_nums, dedent=True) + assert parse_to_ast(textwrap.dedent(code_nums)) + def test_basic_grammar_empty(): code = """