Skip to main content

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.

Metadata

Release files for pytest-xpara 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pytest-xpara 0.3.0
File Size Uploaded
pytest_xpara-0.3.0.tar.gz 5.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pytest-xpara 0.3.0
File Interpreter ABI Platform
pytest_xpara-0.3.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 10.3 kB

Release files / pytest_xpara-0.3.0.tar.gz

Download URL pytest_xpara-0.3.0.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
e1d7fce33aefa9970c916ee97d8f66b240b78adcb543820814e8dcc8af45ea16
BLAKE2b-256 checksum
How to use checksums
8a4dcb3221a10e42465b0935bcd35ffe1c8f4fad73764738c0132ae802035c0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release files / pytest_xpara-0.3.0-py2.py3-none-any.whl

Download URL pytest_xpara-0.3.0-py2.py3-none-any.whl
Size 4.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
3d6625020ebf69892270cf84758f8bb3799e39c023c3aba7e37a5f5b06e7d38a
BLAKE2b-256 checksum
How to use checksums
247883824d004d7fde6f7346b21e9336664b59d820b8ce2f664cf8f4168b4dbe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.4

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page