Skip to main content

pytest plugin to display test execution output like a mochajs

Project description

# pytest-mocha

Pytest output in [MochaJS](http://mochajs.org) format

![pytest-mocha](https://cloud.githubusercontent.com/assets/5260987/26183565/eaa21f8e-3b55-11e7-8c9e-bdf1613d3903.png)

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


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest-mocha-0.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_mocha-0.2.0-py2.py3-none-any.whl (5.9 kB view details)

Uploaded Python 2Python 3

File details

Details for the file pytest-mocha-0.2.0.tar.gz.

File metadata

  • Download URL: pytest-mocha-0.2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pytest-mocha-0.2.0.tar.gz
Algorithm Hash digest
SHA256 a7bb673d023502110e09c3d410ebe296cc0a939c6b0f0c1aad57cdc9182a3fc8
MD5 42e560aa12d97af0feca5f9fce6de2bb
BLAKE2b-256 3cbb0e694097dbfe8c17825fc7da78340fe49180142f626091fc6b3d89d635b0

See more details on using hashes here.

File details

Details for the file pytest_mocha-0.2.0-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_mocha-0.2.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 010f2279cb4d90900d713db5f5251ecb9141ad12dca418377d6f666b3d938ffc
MD5 cd713a9105c3d04d96d36a5ccd059123
BLAKE2b-256 1a1a4d772c33801929b247b5977894eb075e69b1cf889486c1df00bd011b9e1d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page