skip to navigation
skip to content

pytest-param 0.1.1

pytest plugin to test all, first, last or random params

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.6 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.

 
File Type Py Version Uploaded on Size
pytest-param-0.1.1.tar.gz (md5) Source 2016-09-11 5KB
pytest_param-0.1.1-py2.py3-none-any.whl (md5) Python Wheel py2.py3 2016-09-11 4KB