set up asynchronous pytest fixtures concurrently
Project description
Pytest-Gather-Fixtures: run async fixtures concurrently
pytest-gather-fixtures is a library for pytest that allows you to set up and tear down fixtures in parallel. It's useful for when you have multiple independent fixtures that take a long time to set up.
import asyncio
from pytest_gather_fixtures import ConcurrentFixtureGroup
my_fixture_group = ConcurrentFixtureGroup('my_fixture_group')
@my_fixture_group.fixture
async def my_fixture_1():
await asyncio.sleep(1)
@my_fixture_group.fixture
async def my_fixture_2():
await asyncio.sleep(1)
def test_foo(my_fixture_1, my_fixture_2):
# setup for this test will only take 1 second
pass
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pytest-gather-fixtures-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | f9a47e4ab49e56f78189475cc6417da5b8c907ad4785621918f977ff0687ec57 |
|
MD5 | a7682ae961ff0d915bce34451609b9e9 |
|
BLAKE2b-256 | 1896854643b97212b325a21995a2382c48537042148a1082794d3ef275cc683f |
Close
Hashes for pytest_gather_fixtures-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e2dd7bfd490ba49b7d7d698ee2ff3350251b58427e9723f4c4ecb94d2e170ed |
|
MD5 | 7b50825c0487db0594955b31639947aa |
|
BLAKE2b-256 | 0711630da42b1d04275190fef9045d210458c8917d3691a94420d3bc892600c0 |