Skip to main content

set up asynchronous pytest fixtures concurrently

Project description

Pytest-Gather-Fixtures: run async fixtures concurrently

Documentation

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.2.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

pytest_gather_fixtures-0.2.0-py3-none-any.whl (6.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_gather_fixtures-0.2.0.tar.gz.

File metadata

  • Download URL: pytest_gather_fixtures-0.2.0.tar.gz
  • Upload date:
  • Size: 5.6 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

Hashes for pytest_gather_fixtures-0.2.0.tar.gz
Algorithm Hash digest
SHA256 70eec2b67a923ef75a35fa4d1d40a0feeddbb9813e403db87ec1dc2e686941dc
MD5 5cdb62cb1b474de004b6e81a6f51e46a
BLAKE2b-256 dd2a6d86753d5c90029ca36f09552d1fe86ef1f4f753e33cf116d769a4305250

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_gather_fixtures-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8631f91fa18e4b124253f1094fbc4a524fc3b63e60f7e99a3786c5f4cc4232e3
MD5 440616b660ea08e91196cc57dc618708
BLAKE2b-256 dc204a58689621ba9fa876e92c0e8646b1ee53eb0fa5b5de5a085022affc80bf

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