From 8ee106157731e6c49cc072b51ebac0ad6e85f0d0 Mon Sep 17 00:00:00 2001 From: cyberthirst Date: Fri, 29 Mar 2024 14:58:30 +0100 Subject: [PATCH] fix transient modules test --- tests/functional/codegen/features/test_transient.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/functional/codegen/features/test_transient.py b/tests/functional/codegen/features/test_transient.py index 05088a8965..1d412de1d8 100644 --- a/tests/functional/codegen/features/test_transient.py +++ b/tests/functional/codegen/features/test_transient.py @@ -511,13 +511,13 @@ def test_complex_modules_transient(get_contract, make_input_bundle): struct MyStruct: a: uint256 - d: uint256 + b: uint256 s: transient(MyStruct) @internal def foo(): - self.s = MyStruct(a=lib1.l[0], d=lib1.l[1]) + self.s = MyStruct(a=lib1.l[0], b=lib1.l[1]) """ main = """ import lib2 @@ -529,13 +529,13 @@ def foo(): my_map: HashMap[uint256, uint256] @external -def foo() -> (uint256[3], lib2.MyStruct, uint256): +def foo() -> (uint256[3], uint256, uint256, uint256): lib1.l = [1, 2, 3] lib2.foo() self.my_map[0] = 42 - return lib1.l, lib2.s, self.my_map[0] + return lib1.l, lib2.s.a, lib2.s.b, self.my_map[0] """ input_bundle = make_input_bundle({"lib1.vy": lib1, "lib2.vy": lib2}) c = get_contract(main, input_bundle=input_bundle) - assert c.foo() == [[1, 2, 3], (1, 2), 42] + assert c.foo() == [[1, 2, 3], 1, 2, 42]