Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
sandbubbles committed Nov 4, 2024
1 parent c92e1ad commit cf91784
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions tests/functional/syntax/modules/test_initializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1445,6 +1445,27 @@ def test_initializes_on_modules_with_state_related_vars(module, make_input_bundl
compile_code(main, input_bundle=input_bundle)


def test_initializes_on_modules_with_immutables(make_input_bundle):
lib = """
foo: immutable(int128)
@deploy
def __init__():
foo = 2
"""

main = """
import lib
initializes: lib
@deploy
def __init__():
lib.__init__()
"""
input_bundle = make_input_bundle({"lib.vy": lib, "main.vy": main})
compile_code(main, input_bundle=input_bundle)


stateless_modules = [
"""
""",
Expand All @@ -1462,13 +1483,6 @@ def foo(x: uint256, y: uint256) -> uint256:
"""
FOO: constant(int128) = 128
""",
"""
foo: immutable(int128)
@deploy
def __init__():
foo = 2
""",
]


Expand Down

0 comments on commit cf91784

Please sign in to comment.