https://github.com/rudineirk/pytest-mocha
Pytest output in MochaJS format
https://github.com/rudineirk/pytest-mocha
pretty-print pytest pytest-mocha python testing
Last synced: 2 months ago
JSON representation
Pytest output in MochaJS format
- Host: GitHub
- URL: https://github.com/rudineirk/pytest-mocha
- Owner: rudineirk
- License: mit
- Created: 2017-05-18T01:46:16.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2024-04-18T20:52:15.000Z (about 2 years ago)
- Last Synced: 2025-09-21T21:20:54.866Z (9 months ago)
- Topics: pretty-print, pytest, pytest-mocha, python, testing
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 14
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# pytest-mocha
Pytest output in [MochaJS](http://mochajs.org) format

It uses docstrigs as a tool to create the sections that mocha creates using the `describe` and `it` structure. Example:
```python
# 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
```
## Install
```
pip install pytest-mocha
```
## Use
```
pytest --mocha
```
## Args
* `--mocha`: Enable mocha as pytest reporter
* `--mocha-force-disable`: Disable mocha reporter even if enabled with `--mocha` flag