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.2.1.tar.gz
.
File metadata
- Download URL: pytest_gather_fixtures-0.2.1.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.8.18 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a4af39004402bad27ee87bd895dccd229f2e5cf510b8da6dea2d5104ace543c3 |
|
MD5 | 8ffad697791b00c7f185fdd23de7f4ee |
|
BLAKE2b-256 | 7cd33324b4e102340d8d92b3055d14c69572490fcc28d1ddcfd7527a79d22091 |
File details
Details for the file pytest_gather_fixtures-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: pytest_gather_fixtures-0.2.1-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.8.18 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6fbc9aa491d5f1cdb96bc59f71d7158d5880bf420ed0772e028697b8e955261a |
|
MD5 | c450bc8701e64752422fad1ae68e2dca |
|
BLAKE2b-256 | c924b46f9efd1aeddbbe33285847fb40d99da48a336d2161b3768d16c7a74477 |