agent0.test_fixtures.chain_fixture ================================== .. py:module:: agent0.test_fixtures.chain_fixture .. autoapi-nested-parse:: Local chain connected to a local database hosted in docker. .. !! processed by numpydoc !! Functions --------- .. autoapisummary:: agent0.test_fixtures.chain_fixture.launch_chain agent0.test_fixtures.chain_fixture.chain_fixture agent0.test_fixtures.chain_fixture.init_chain agent0.test_fixtures.chain_fixture.fast_chain_fixture Module Contents --------------- .. py:function:: launch_chain(port_base) -> agent0.core.hyperdrive.interactive.LocalChain Launches a local chain. :param port_base: The base port number to use for the chain and database. The chain port will be `port_base`, and the database port will be `port_base + 1`. :type port_base: int :returns: The local chain. :rtype: LocalChain .. !! processed by numpydoc !! .. py:function:: chain_fixture() -> Iterator[agent0.core.hyperdrive.interactive.LocalChain] Local chain connected to a local database hosted in docker. This fixture launches a chain from scratch in a function scope. :Yields: *LocalChain* -- The local chain instance. .. !! processed by numpydoc !! .. py:function:: init_chain() -> Iterator[agent0.core.hyperdrive.interactive.LocalChain] Local chain connected to a local database hosted in docker. This fixture launches a chain from scratch in a session scope. :Yields: *LocalChain* -- local chain instance. .. !! processed by numpydoc !! .. py:function:: fast_chain_fixture(init_chain: agent0.core.hyperdrive.interactive.LocalChain) -> Iterator[agent0.core.hyperdrive.interactive.LocalChain] Local chain connected to a local database hosted in docker. This fixture uses snapshot on an existing chain in a function scope. .. note:: This chain is booted from an existing snapshot for speed. If you save a new snapshot the first will be overwritten. :param init_chain: Session scoped chain fixture. :type init_chain: LocalChain :Yields: *LocalChain* -- Local chain instance. .. !! processed by numpydoc !!