agent0.test_fixtures.hyperdrive_fixture

Local chain connected to a local database hosted in docker.

Functions

launch_hyperdrive(...)

Launches a hyperdrive pool on a given chain.

hyperdrive_fixture(...)

Local hyperdrive pool test fixture.

init_hyperdrive(...)

Local hyperdrive pool test fixture.

fast_hyperdrive_fixture(...)

Local hyperdrive pool test fixture.

Module Contents

agent0.test_fixtures.hyperdrive_fixture.launch_hyperdrive(in_chain: agent0.core.hyperdrive.interactive.LocalChain) agent0.core.hyperdrive.interactive.LocalHyperdrive

Launches a hyperdrive pool on a given chain.

Parameters:

in_chain (LocalChain) – The chain object.

Returns:

The deployed hyperdrive object.

Return type:

LocalHyperdrive

agent0.test_fixtures.hyperdrive_fixture.hyperdrive_fixture(chain_fixture: agent0.core.hyperdrive.interactive.LocalChain) agent0.core.hyperdrive.interactive.LocalHyperdrive

Local hyperdrive pool test fixture. This fixture launches a chain from scratch in a function scope.

Parameters:

chain_fixture (LocalChain) – Function scoped chain fixture.

Returns:

The deployed hyperdrive object.

Return type:

LocalHyperdrive

agent0.test_fixtures.hyperdrive_fixture.init_hyperdrive() Iterator[agent0.core.hyperdrive.interactive.LocalHyperdrive]

Local hyperdrive pool test fixture. This fixture launches a hyperdrive pool from scratch in a session scope.

Yields:

LocalHyperdrive – The deployed hyperdrive object.

agent0.test_fixtures.hyperdrive_fixture.fast_hyperdrive_fixture(init_hyperdrive: agent0.core.hyperdrive.interactive.LocalHyperdrive) Iterator[agent0.core.hyperdrive.interactive.LocalHyperdrive]

Local hyperdrive pool test fixture. This fixture uses snapshot on an existing chain in a function scope.

Note

This pool is booted from an existing snapshot for speed. If you save a new snapshot the first will be overwritten.

Parameters:

init_hyperdrive (LocalHyperdrive) – Session scoped hyperdrive fixture.

Yields:

LocalHyperdrive – The deployed hyperdrive object.