Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonyseek/pytest-xpara
An extended parametrizing plugin of pytest.
https://github.com/tonyseek/pytest-xpara
json pytest-plugin python toml yaml
Last synced: 2 months ago
JSON representation
An extended parametrizing plugin of pytest.
- Host: GitHub
- URL: https://github.com/tonyseek/pytest-xpara
- Owner: tonyseek
- License: mit
- Created: 2017-01-01T16:44:18.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-08-07T06:26:58.000Z (5 months ago)
- Last Synced: 2024-10-14T00:29:49.259Z (3 months ago)
- Topics: json, pytest-plugin, python, toml, yaml
- Language: Python
- Size: 42 KB
- Stars: 18
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.rst
- License: LICENSE
Awesome Lists containing this project
README
|Build Status| |Coverage Status| |PyPI Version|
pytest-xpara
============*pytest-xpara* is an extended parametrizing plugin of pytest.
Installation
------------::
pip install pytest-xpara
Usage
-----::
py.test --xpara test_foo.py
Example
-------.. code-block:: python
# test_foo.py
import pytest@pytest.mark.xparametrize
def test_bar(lhs, rhs):
assert lhs == -rhs.. code-block:: yaml
# 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 itemstest_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_... _GitHub: https://github.com/tonyseek/pytest-xpara/issues
.. |Build Status| image:: https://img.shields.io/github/actions/workflow/status/tonyseek/pytest-xpara/check.yml?branch=master&style=flat
:target: https://github.com/tonyseek/pytest-xpara/actions/workflows/check.yml
:alt: Build Status
.. |Coverage Status| image:: https://img.shields.io/coverallsCoverage/github/tonyseek/pytest-xpara?style=flat&branch=master
:target: https://coveralls.io/github/tonyseek/pytest-xpara
:alt: Coverage Status
.. |PyPI Version| image:: https://img.shields.io/pypi/v/pytest-xpara?style=flat
:target: https://pypi.org/project/pytest-xpara/
:alt: PyPI Version