Skip to main content

Finally spell paramete?ri[sz]e correctly

Project description

pytest-parawtf
==============

Ever wondered how pytest_ decides to spell parametrise? Was it
parameterize? Parametrise? Parametrize?

Confused yet? Stop worrying, install this plugin and all variants are
valid::

@pytest.mark.parametrize('a', [0, 1])
@pytest.mark.parameterize('b', [2, 3])
@pytest.mark.parametrise('c', [4, 5])
@pytest.mark.parametrise('d', [6, 7])
def test_wtf(a, b, c, d):
assert a in [0, 1]
assert b in [2, 3]
assert c in [4, 5]
assert d in [6, 7]

But if you've ever parametrised a fixture, you may wonder why it's yet
another spelling over there: ``@pytest.fixture(params=[0, 1])``. Fear
not, you can now be consistent::

@pytest.mark.params('a', [0, 1])
def test_simple(a):
assert a in [0, 1]

What about when you implement the ``pytest_generate_tests`` hook in
your ``conftest.py`` file? We got you covered, ``metafunc.params()``
and the other (in)sane variations are now valid too.


Monkey see, monkey do
---------------------

This plugins monkeypatches the core pytest in ways which should never
be done. In other words it voids all your warranties. Use at your
own risk.

_pytest: https://pytest.org


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-parawtf-1.0.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

pytest_parawtf-1.0.0-py2.py3-none-any.whl (2.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pytest-parawtf-1.0.0.tar.gz.

File metadata

  • Download URL: pytest-parawtf-1.0.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for pytest-parawtf-1.0.0.tar.gz
Algorithm Hash digest
SHA256 529158079940463bc40a881d0f740f4090f54a7f6bf4db5e53151fc0cba30544
MD5 c13aef148566528ef5627decc5bb189b
BLAKE2b-256 8edb881159b0bc4aec65301a2f0a579d9afb3032b28c4846231f1ad10910c505

See more details on using hashes here.

File details

Details for the file pytest_parawtf-1.0.0-py2.py3-none-any.whl.

File metadata

  • Download URL: pytest_parawtf-1.0.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.0 setuptools/39.2.0 requests-toolbelt/0.8.0 tqdm/4.23.4 CPython/3.6.5

File hashes

Hashes for pytest_parawtf-1.0.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 a0be97738283395f5bb619f6e6d85ff73762fd10ad159f0afc70c19f14b79d9e
MD5 2d1d2cb262cc998003af540651215f81
BLAKE2b-256 b6a4296e9e849837b2ae3c60ffdaa2ac3aaff14e1a71a4f361614e6b2a19d7e4

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