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.1.1.tar.gz
(3.2 kB
view details)
Built Distribution
File details
Details for the file pytest-xpara-0.1.1.tar.gz
.
File metadata
- Download URL: pytest-xpara-0.1.1.tar.gz
- Upload date:
- Size: 3.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d7596ac9aa6779031d82c4b429ee878132126c17db2d575d44a304a172f6fbf |
|
MD5 | 306664af90509bb824e9badcc5422cc1 |
|
BLAKE2b-256 | 3a0fd49d0165643465fc5a26c09a48e75e2a97d857c522fa0b153fa704acbd3b |
File details
Details for the file pytest_xpara-0.1.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pytest_xpara-0.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91ab093c887941146f3000d4795061b877bfffeac35639e587e5bbf765a55642 |
|
MD5 | a10e228f4008f4f5f6c285fcfc45e45d |
|
BLAKE2b-256 | 0910dfacb32c94755affd31544828de152737d557ace29fc99c74d42ec3b96d3 |