Skip to main content

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

pytest-gather-fixtures-0.1.1.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

pytest_gather_fixtures-0.1.1-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file pytest-gather-fixtures-0.1.1.tar.gz.

File metadata

  • Download URL: pytest-gather-fixtures-0.1.1.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.13.0-1021-azure

File hashes

Hashes for pytest-gather-fixtures-0.1.1.tar.gz
Algorithm Hash digest
SHA256 f9a47e4ab49e56f78189475cc6417da5b8c907ad4785621918f977ff0687ec57
MD5 a7682ae961ff0d915bce34451609b9e9
BLAKE2b-256 1896854643b97212b325a21995a2382c48537042148a1082794d3ef275cc683f

See more details on using hashes here.

File details

Details for the file pytest_gather_fixtures-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_gather_fixtures-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4e2dd7bfd490ba49b7d7d698ee2ff3350251b58427e9723f4c4ecb94d2e170ed
MD5 7b50825c0487db0594955b31639947aa
BLAKE2b-256 0711630da42b1d04275190fef9045d210458c8917d3691a94420d3bc892600c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page