Skip to main content

pytest-easy-addoption: Easy way to work with pytest addoption

Project description

pytest-easy-addoption pytest addoption but with power of type annotations and dataclasses.

More documentation here.

An quick example of a usage:

from pytest_easy_addoption import AddOption

class FooBarAddOption(AddOption):
    foo: str
    bar: str = 'BAR'

def pytest_addoption(parser):
from .conftest import FooBarAddOption

def test_example(request):
$ pytest --foo="FOO"
============================= test session starts =============================
collected 1 items FooBarAddOption(foo='FOO', bar='BAR')

=============================  1 passed in 0.03s  =============================

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-easy-addoption-0.1.1.tar.gz (5.2 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page