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 plugin monkeypatches the core pytest in ways which should never be done. In other words it voids all your warranties. Use at your own risk.
Changelog
1.0.2
Actually stop using setup.py.
Move to src/ layout, even for a single-module package.
Include the tests in the sdist.
1.0.1
Fix REAME formatting and typos.
Include the LICENSE file in the .tar.gz and .whl.
Add pyproject.toml and move more things to setup.cfg.
1.0.0
Initial release.
The MIT License
Copyright (C) 2017-2018 Floris Bruynooghe
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
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
Built Distribution
File details
Details for the file pytest-parawtf-1.0.2.tar.gz
.
File metadata
- Download URL: pytest-parawtf-1.0.2.tar.gz
- Upload date:
- Size: 3.6 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43809aad1284b1a9ecf4095e20a9535413a676f3df2bcb406a7953543c344823 |
|
MD5 | 66e580e39d31ccf999e36e5c3187e552 |
|
BLAKE2b-256 | 47b1f46ed09ffdfed4a522bf1feeda21759e377816ecd345bc5778a11322270c |
File details
Details for the file pytest_parawtf-1.0.2-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_parawtf-1.0.2-py2.py3-none-any.whl
- Upload date:
- Size: 4.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d7651e7c544051868aafe32ad13071bc921b158207953f58ff32d7f306b67e6 |
|
MD5 | 8963d56a392cee3b81509ad8b496bb76 |
|
BLAKE2b-256 | 2901bb1f51e4e46bbe3ce00b6397a33ca72bd1a281cd91979d42083f91e38cb8 |