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  =============================

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-easy-addoption-0.1.1.tar.gz (5.2 kB view hashes)

Uploaded Source

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