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):
    FooBarAddOption.register(parser)
from .conftest import FooBarAddOption

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

test_sample.py FooBarAddOption(foo='FOO', bar='BAR')
.

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

Release history Release notifications

Download files

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

Files for pytest-easy-addoption, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pytest-easy-addoption-0.1.1.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page