From 9c417c5d6ebd36ca4449d28f5313db29faf5773c Mon Sep 17 00:00:00 2001 From: tserg <8017125+tserg@users.noreply.github.com> Date: Thu, 2 Nov 2023 19:18:43 +0800 Subject: [PATCH] fix more tests --- tests/parser/exceptions/test_argument_exception.py | 5 +++++ tests/parser/exceptions/test_undeclared_definition.py | 5 ----- tests/parser/functions/test_unary.py | 7 +------ 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/parser/exceptions/test_argument_exception.py b/tests/parser/exceptions/test_argument_exception.py index 13dfb3cbe7..2604cb310f 100644 --- a/tests/parser/exceptions/test_argument_exception.py +++ b/tests/parser/exceptions/test_argument_exception.py @@ -84,6 +84,11 @@ def foo(): for i in range(1, 2, 3, 4): pass """, + """ +@external +def foo(): + x = as_wei_value(5, "vader") + """, ] diff --git a/tests/parser/exceptions/test_undeclared_definition.py b/tests/parser/exceptions/test_undeclared_definition.py index f1aac1ee05..f90aa4137b 100644 --- a/tests/parser/exceptions/test_undeclared_definition.py +++ b/tests/parser/exceptions/test_undeclared_definition.py @@ -61,11 +61,6 @@ def foo(): def foo(): bork = zork """, - """ -@external -def foo(): - x = as_wei_value(5, "vader") - """, ] diff --git a/tests/parser/functions/test_unary.py b/tests/parser/functions/test_unary.py index da3823edfe..826bbe9d0c 100644 --- a/tests/parser/functions/test_unary.py +++ b/tests/parser/functions/test_unary.py @@ -68,16 +68,11 @@ def bar() -> decimal: def test_negation_int128(get_contract): code = """ -a: constant(int128) = -2**127 - -@external -def foo() -> int128: - return -2**127 +a: constant(int128) = min_value(int128) @external def bar() -> int128: return -(a+1) """ c = get_contract(code) - assert c.foo() == -(2**127) assert c.bar() == 2**127 - 1