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

Uploaded Source

Built Distribution

pytest_gather_fixtures-0.2.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

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

Hashes for pytest_gather_fixtures-0.2.1.tar.gz
Algorithm Hash digest
SHA256 a4af39004402bad27ee87bd895dccd229f2e5cf510b8da6dea2d5104ace543c3
MD5 8ffad697791b00c7f185fdd23de7f4ee
BLAKE2b-256 7cd33324b4e102340d8d92b3055d14c69572490fcc28d1ddcfd7527a79d22091

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_gather_fixtures-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6fbc9aa491d5f1cdb96bc59f71d7158d5880bf420ed0772e028697b8e955261a
MD5 c450bc8701e64752422fad1ae68e2dca
BLAKE2b-256 c924b46f9efd1aeddbbe33285847fb40d99da48a336d2161b3768d16c7a74477

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