pytest is a unit testing framework that attempts to be more "Pythonic." An important goal of it was to minimize the amount of additional code that had to be written in unittest in order to make tests run. pytest has often been described as "no-boilerplate" testing due to its minimal setup requirements. The home page for the project can be found at https://pytest.org/latest/index.html.
pytest can be installed using pip
:
pip install pytest
One can test the installation as follows:
(my_rpy2_zone)-bash-4.1$ py.test --version This is pytest version 2.8.7, imported from …
It is easy to invoke from the command line:
(my_rpy2_zone)-bash-4.1$ py.test ================================================= test session starts ================================================== platform linux -- Python 3.4.4, pytest-2.8.7, py-1.4.31, pluggy-0.3.1 rootdir: …/chap08, inifile: collected 0 items ============================================= no tests ran in 0.03 seconds ==================...