pytest-expectr

This plugin is used to expect multiple assert using pytest framework.


Keywords
py, test, pytest, json, variables
License
MPL-2.0
Install
pip install pytest-expectr==1.4.2

Documentation

pytest_expectr

pytest-expectr is a plugin for pytest that provide expect to tests/fixtures for multiple assert use.

Requirements

You will need the following prerequisites in order to use pytest-expectr:

  • Python 2.7, 3.6, PyPy, or PyPy3
  • pytest 2.6 or newer

How to install

To install pytest-expectr:

pip install pytest-expectr

How to use

def test_hello(expect):
    expect(1==2, 'your error message 1')
    expect(1==3, 'your error message 2')
    ...