pytest plugin to test all, first, last or random params
Project description
pytest-param is a plugin for py.test that makes it easy to test all, first, last or random params.
Requirements
You will need the following prerequisites to use pytest-param:
Python 2.6, 2.7, 3.2, 3.3, 3.4, 3.5, PyPy or PyPy3
py.test 2.8 or newer
Installation
To install pytest-param:
$ pip install pytest-param
Testing a param
Given test_file.py with this test:
import pytest
@pytest.mark.parametrize("params", [True, False])
def test_param(params):
pass
Use the --param=first
command line option to test the True
param:
$ py.test --param=first test_file.py
Use --param=last
to test the False
param:
$ py.test --param=last test_file.py
Use --param=random
to test one of the params at random.
Resources
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-param-0.1.tar.gz
(5.3 kB
view hashes)
Built Distribution
Close
Hashes for pytest_param-0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6b61306195db282d14089852ed506592c95772e3794106c5de9547b9f3bcdcc |
|
MD5 | 33d92d405e64c56b1fcb273e68ea7550 |
|
BLAKE2b-256 | ba6be5e43ad4447e34c012b415d437f3c044d1c95c82b09d1b7f8762aa8dd068 |