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 =============================
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for pytest-easy-addoption-0.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48caebbf7b30bda872249f66fe4cf1ddf057ec43663bf33ee974b2305d780cbe |
|
MD5 | d2f12c40d189d2accd3fccb154b119c9 |
|
BLAKE2b-256 | 8411efe7eed6e1fb983ff8e6000d3128d0818b6fc532b84f10a3fd87eab42841 |