@pytest.mark.skipif((not SOLIDITY_AVAILABLE), reason='solc compiler not available')
def test_abicontract_interface():
 tester_state = state()
 contract_path = path.join(CONTRACTS_DIR, 'simple_contract.sol')
 simple_compiled = compile_file(contract_path)
 simple_address = tester_state.evm(simple_compiled['Simple']['bin'])
 abi_json = json.dumps(simple_compiled['Simple']['abi']).encode('utf-8')
 abi = ABIContract(_state=tester_state, _abi=abi_json, address=simple_address, listen=False, log_listener=None, default_key=None)
 assert (abi.test() == 1)

@ pytest . mark . skipif ( ( not SOLIDITY_AVAILABLE ) , reason = 'solc compiler not available' ) def test_abicontract_interface ( ) : tester_state = state ( ) contract_path = path . join ( CONTRACTS_DIR , 'simple_contract.sol' ) simple_compiled = compile_file ( contract_path ) simple_address = tester_state . evm ( simple_compiled [ 'Simple' ] [ 'bin' ] ) abi_json = json . dumps ( simple_compiled [ 'Simple' ] [ 'abi' ] ) . encode ( 'utf-8' ) abi = ABIContract ( _state = tester_state , _abi = abi_json , address = simple_address , listen = False , log_listener = None , default_key = None ) assert ( abi . test ( ) == 1 )
test for issue #370 .