| | |
| | | :ref:`Quick Tutorial pyramid_debugtoolbar <qtut_debugtoolbar>` and |
| | | :ref:`pyramid_debugtoolbar <toolbar:overview>` |
| | | |
| | | Unit tests and ``py.test`` |
| | | Unit tests and ``pytest`` |
| | | ========================== |
| | | |
| | | Yikes! We got this far and we haven't yet discussed tests. This is particularly |
| | |
| | | |
| | | Our ``pyramid-cookiecutter-starter`` cookiecutter generated a ``tests.py`` module with |
| | | one unit test and one functional test in it. It also configured ``setup.py`` with test requirements: |
| | | ``py.test`` as the test runner, ``WebTest`` for running view tests, and the |
| | | ``pytest`` as the test runner, ``WebTest`` for running view tests, and the |
| | | ``pytest-cov`` tool which yells at us for code that isn't tested: |
| | | |
| | | .. literalinclude:: quick_tour/package/setup.py |
| | |
| | | |
| | | .. code-block:: bash |
| | | |
| | | $VENV/bin/py.test --cov --cov-report=term-missing |
| | | $VENV/bin/pytest --cov --cov-report=term-missing |
| | | |
| | | This yields the following output. |
| | | |