def web3_rpc_persistent(geth_persistent): from web3 import ( Web3, RPCProvider, ) provider = RPCProvider(port=geth_persistent.rpc_port) provider._geth = geth_persistent web3 = Web3(provider) return web3
def web3_rpc_empty(): from web3 import ( Web3, RPCProvider, ) with setup_testing_geth() as geth: provider = RPCProvider(port=geth.rpc_port) provider._geth = geth web3 = Web3(provider) yield web3