Skip to content

Commit

Permalink
test: show that get_deployment_bytecode and alike function (#112)
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey authored Jan 4, 2024
1 parent 91f16b3 commit 8d19725
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/test_contract_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,3 +349,25 @@ def test_identifier_lookup(vyper_contract):
].selector
== "FooHappened(uint256)"
)


def test_get_runtime_bytecode(vyper_contract):
actual = vyper_contract.get_runtime_bytecode()
assert actual.hex().startswith("0x")


def test_get_runtime_bytecode_no_code(vyper_contract):
vyper_contract.runtime_bytecode = None
actual = vyper_contract.get_runtime_bytecode()
assert actual is None


def test_get_deployment_bytecode(vyper_contract):
actual = vyper_contract.get_deployment_bytecode()
assert actual.hex().startswith("0x")


def test_get_deployment_bytecode_no_code(vyper_contract):
vyper_contract.deployment_bytecode = None
actual = vyper_contract.get_deployment_bytecode()
assert actual is None

0 comments on commit 8d19725

Please sign in to comment.