An extended parametrizing plugin of pytest.
Project description
pytest-xpara is an extended parametrizing plugin of pytest.
Installation
pip install pytest-xpara
Usage
py.test --xpara test_foo.py
Example
# test_foo.py
import pytest
@pytest.mark.xparametrize
def test_bar(lhs, rhs):
assert lhs == -rhs
# test_foo.yaml
test_bar:
args: lhs,rhs
data:
- lhs: 1
rhs: -1
- lhs: -1
rhs: 1
dataids:
- left_to_right
- right_to_left
$ py.test -v --xpara test_foo.py ========================== test session starts =========================== platform darwin -- Python 2.7.12, pytest-3.0.5, py-1.4.32, pluggy-0.4.0 cachedir: ../.cache rootdir: /Users/tonyseek/Sites/pytest-xpara, inifile: setup.cfg plugins: xpara-0.0.0, cov-2.4.0 collecting ... collected 2 items test_foo.py::test_bar[left_to_right] PASSED test_foo.py::test_bar[right_to_left] PASSED ======================== 2 passed in 0.03 seconds ========================
Contributing
If you want to report bugs or request features, please feel free to open issues or create pull requests on GitHub.
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
pytest_xpara-0.3.0.tar.gz
(5.7 kB
view details)
Built Distribution
File details
Details for the file pytest_xpara-0.3.0.tar.gz
.
File metadata
- Download URL: pytest_xpara-0.3.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1d7fce33aefa9970c916ee97d8f66b240b78adcb543820814e8dcc8af45ea16 |
|
MD5 | 1545b81c87e7016d4683acf9d98ecf55 |
|
BLAKE2b-256 | 8a4dcb3221a10e42465b0935bcd35ffe1c8f4fad73764738c0132ae802035c0b |
File details
Details for the file pytest_xpara-0.3.0-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_xpara-0.3.0-py2.py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d6625020ebf69892270cf84758f8bb3799e39c023c3aba7e37a5f5b06e7d38a |
|
MD5 | 016f507d726a3254dec40ab82764b054 |
|
BLAKE2b-256 | 247883824d004d7fde6f7346b21e9336664b59d820b8ce2f664cf8f4168b4dbe |