Skip to content

Commit

Permalink
add multiple contracts parametrization example
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Feb 28, 2022
1 parent 9f0f32d commit 3ef9776
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions tests/parser/syntax/constants/test_constantGetter2_Success.vy
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
VAL: constant(int128) = 123

@external
def foo() -> int128:
return VAL
7 changes: 6 additions & 1 deletion tests/parser/syntax/test_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,12 @@ def test_constant_success(good_code):


@pytest.mark.parametrize(
"vyper_contract", ["constants/test_constantGetter1_Success.vy"], indirect=True
"vyper_contract",
[
"constants/test_constantGetter1_Success.vy",
"constants/test_constantGetter2_Success.vy",
],
indirect=True,
)
def test_constant_success_2(vyper_contract):
assert vyper_contract.foo() == 123

0 comments on commit 3ef9776

Please sign in to comment.