Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Mar 23, 2024
1 parent ee7c5ed commit 5c9d3c4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions tests/functional/codegen/features/test_transient.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from vyper.compiler import compile_code
from vyper.evm.opcodes import version_check
from vyper.exceptions import StructureException
from vyper.exceptions import StructureException, VyperException


def test_transient_blocked(evm_version):
Expand Down Expand Up @@ -135,7 +135,8 @@ def foo(_a: uint256, _b: address, _c: String[64]) -> (uint256, address, String[6
c = get_contract(code)
assert c.foo(*values) == list(values)
else:
with pytest.raises(StructureException):
# multiple errors
with pytest.raises(VyperException):
compile_code(code)


Expand Down Expand Up @@ -364,5 +365,10 @@ def a():
def b():
self.d = self.x
"""
c = get_contract(code)
assert c.d() == 2

if version_check(begin="cancun"):
c = get_contract(code)
assert c.d() == 2
else:
with pytest.raises(StructureException):
compile_code(code)

0 comments on commit 5c9d3c4

Please sign in to comment.