Pytest output in MochaJS format
It uses docstrigs as a tool to create the sections that mocha creates using the describe
and it
structure. Example:
# file examples/test_example.py
def test_case():
'''Section :: subsection :: Should execute test'''
pass
outputs this:
Section :: examples/test_example.py
subsection
✓ Should execute test
pip install pytest-mocha
pytest --mocha
--mocha
: Enable mocha as pytest reporter--mocha-force-disable
: Disable mocha reporter even if enabled with--mocha
flag