pytest-easy-addoption 0.1.1

Creator: codyrutscher

Last updated:

0 purchases

pytest-easy-addoption 0.1.1 Image
pytest-easy-addoption 0.1.1 Images
Add to Cart

Description:

pytesteasyaddoption 0.1.1

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

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.