Skip to main content

simplify pytest fixtures

Project description

pytest-autofixture

Simplify pytest fixtures by making them automagically available. Tests can reference fixtures without needing to reference them as function parameters.

Install

pip install pytest-autofixture

Usage

# conftest.py
import pytest

@pytest.fixture
def one():
    return 1


# test_one.py
def test_one():
  assert one == 1

Coverage Status installs

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_autofixture-0.2.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

pytest_autofixture-0.2.1-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file pytest_autofixture-0.2.1.tar.gz.

File metadata

  • Download URL: pytest_autofixture-0.2.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for pytest_autofixture-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0a6f4a08db1eaf75f76e77733b7805c2b89c5f835e29b452ee92fc528fc6d504
MD5 2868b8cfbeee862eb6a5a17e52e07ba6
BLAKE2b-256 952f814b65778b897fbf798376654c462fc1e60cd43bdf4ac96afbca63cc05d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for pytest_autofixture-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bd2abcab27858d5ccfac439336e69210d534e55b7ed8313e2297cbfdcc891c4d
MD5 a736ebc722cbc0e4bf4899b6006d8f63
BLAKE2b-256 121b49ac05a0e867b1bc6ce6e98e709ace40e9ef28a46a13d7fa83d731e302f8

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