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.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | af8e00b982c3dbfcb78d190ed78937f575122dbeee7ccafe070c940b2fd372c0 |
|
MD5 | 3aa5ea25411656f3499383d2aed2a18b |
|
BLAKE2b-256 | 85a2ae7a46697b120cea4c81aea2508872a0b8ccd0b3790e4175ea2a74b2adab |
Close
Hashes for pytest_gather_fixtures-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10fa24cdc7a6bd51c893ffb51de2e2ce54b5afe404959e9db311fa1924083e30 |
|
MD5 | 12491cf337feb245dc08a6bb0bb41ae6 |
|
BLAKE2b-256 | bfd9672970134b5f8105b466370f519bcf6dc29497d6abe7d3a6500945938d07 |