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

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 details)

Uploaded Source

File details

Details for the file pytest-easy-addoption-0.1.1.tar.gz.

File metadata

  • Download URL: pytest-easy-addoption-0.1.1.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.6

File hashes

Hashes for pytest-easy-addoption-0.1.1.tar.gz
Algorithm Hash digest
SHA256 48caebbf7b30bda872249f66fe4cf1ddf057ec43663bf33ee974b2305d780cbe
MD5 d2f12c40d189d2accd3fccb154b119c9
BLAKE2b-256 8411efe7eed6e1fb983ff8e6000d3128d0818b6fc532b84f10a3fd87eab42841

See more details on using hashes here.

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