We should be using pytest everywhere. That includes
usage of assert statement everywhere
usage of pytest.raises context manager (examples here)
removal of unittest.TestCase inheritance
This makes things simpler (because of introspection), allows to use pytest.mark.parametrize and fixtures. Also self.assertRaisesRegex would fail in some certain situation.
We should be using pytest everywhere. That includes
assert
statement everywherepytest.raises
context manager (examples here)This makes things simpler (because of introspection), allows to use
pytest.mark.parametrize
and fixtures. Alsoself.assertRaisesRegex
would fail in some certain situation.Could use https://pypi.python.org/pypi/unittest2pytest/ for this.