Skip to main content

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.

License PyPI Travis Issues

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.

Project details


Release history Release notifications

This version
History Node

0.1.1

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pytest_param-0.1.1-py2.py3-none-any.whl (4.5 kB) Copy SHA256 hash SHA256 Wheel py2.py3 Sep 11, 2016
pytest-param-0.1.1.tar.gz (5.3 kB) Copy SHA256 hash SHA256 Source None Sep 11, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page