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 hashes)
Built Distribution
Close
Hashes for pytest_xpara-0.3.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d6625020ebf69892270cf84758f8bb3799e39c023c3aba7e37a5f5b06e7d38a |
|
MD5 | 016f507d726a3254dec40ab82764b054 |
|
BLAKE2b-256 | 247883824d004d7fde6f7346b21e9336664b59d820b8ce2f664cf8f4168b4dbe |