<commit_before>pytest-testdox
==============

.. image:: https://travis-ci.org/renanivo/pytest-testdox.svg?branch=master
    :target: https://travis-ci.org/renanivo/pytest-testdox

.. image:: https://codecov.io/gh/renanivo/pytest-testdox/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/renanivo/pytest-testdox

A `TestDox format`_ reporter for pytest

.. _TestDox format: https://en.wikipedia.org/wiki/TestDox

::

    Pytest TestDox
    - [x] prints a bdd style output to your test functions
    - [x] lets you focus on the behavior


Install
-------

::

    pip install pytest-testdox


Usage
-----

::

    pytest --testdox your-tests/
<commit_msg>Update README with new report output and configuration options<commit_after>pytest-testdox
==============

.. image:: https://travis-ci.org/renanivo/pytest-testdox.svg?branch=master
    :target: https://travis-ci.org/renanivo/pytest-testdox

.. image:: https://codecov.io/gh/renanivo/pytest-testdox/branch/master/graph/badge.svg
    :target: https://codecov.io/gh/renanivo/pytest-testdox

A `TestDox format`_ reporter for pytest

.. _TestDox format: https://en.wikipedia.org/wiki/TestDox

.. image:: http://i.imgur.com/rJRL4x9.png

Install
-------

::

    pip install pytest-testdox


Usage
-----

Add the parameter `--testdox` when running `pytest`. Ex:

::

    pytest --testdox your-tests/

Tip: If you don't want to type ``--testdox`` every time you run ``pytest``, add it
to `addopts <https://docs.pytest.org/en/latest/customize.html#confval-addopts>`_
in your `ini file <https://docs.pytest.org/en/latest/customize.html#initialization-determining-rootdir-and-inifile>`_. Ex:

.. code-block:: ini

    # content of pytest.ini
    # (or tox.ini or setup.cfg)
    [pytest]
    addopts = --testdox


Configuration file options
--------------------------

testdox\_format
~~~~~~~~~~~~~~~

Specifies TestDox report format, ``plaintext`` or ``utf8`` (default:
``utf8``). Ex:

.. code:: ini

    # content of pytest.ini
    # (or tox.ini or setup.cfg)
    [pytest]
    testdox_format = plaintext

::

    $ pytest test_demo.py
    ============================= test session starts ==============================
    platform darwin -- Python 3.5.0, pytest-3.0.7, py-1.4.33, pluggy-0.4.0
    rootdir: /private/tmp/demo, inifile: pytest.ini
    plugins: testdox-dev
    collected 2 items

    test_demo.py
    Pytest Testdox
     [x] prints a BDD style output to your tests
     [x] lets you focus on the behavior

{'fraction_non_alphanumeric': 0.1875, 'fraction_numerical': 0.007258064516129033, 'mean_word_length': 3.0672131147540984, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 12, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '162142', 'n_tokens_mistral': 898, 'n_tokens_neox': 901, 'n_words': 191}