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
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
File details
Details for the file pytest-gather-fixtures-0.1.0.tar.gz
.
File metadata
- Download URL: pytest-gather-fixtures-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.11.0-1028-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af8e00b982c3dbfcb78d190ed78937f575122dbeee7ccafe070c940b2fd372c0 |
|
MD5 | 3aa5ea25411656f3499383d2aed2a18b |
|
BLAKE2b-256 | 85a2ae7a46697b120cea4c81aea2508872a0b8ccd0b3790e4175ea2a74b2adab |
File details
Details for the file pytest_gather_fixtures-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pytest_gather_fixtures-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.8.12 Linux/5.11.0-1028-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10fa24cdc7a6bd51c893ffb51de2e2ce54b5afe404959e9db311fa1924083e30 |
|
MD5 | 12491cf337feb245dc08a6bb0bb41ae6 |
|
BLAKE2b-256 | bfd9672970134b5f8105b466370f519bcf6dc29497d6abe7d3a6500945938d07 |