cic-contracts/python/cic_contracts/unittest/__init__.py

18 lines
380 B
Python
Raw Permalink Normal View History

# standard imports
import os
2023-06-09 10:44:03 +02:00
# local imports
from cic_contracts.search import search
from cic_contracts import Name
cic_unittest_dir = os.path.dirname(os.path.realpath(__file__))
contracts_dir = os.path.join(cic_unittest_dir, 'solidity')
def bytecode(v):
2023-06-09 10:44:03 +02:00
if isinstance(v, Name):
v = v.value
return search(v + 'Test', ext='bin', search_dir=contracts_dir)