0 purchases
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 =============================
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.