<commit_before>.. image:: https://api.travis-ci.org/paylogic/pytest-fixture-tools.png
   :target: https://travis-ci.org/paylogic/pytest-fixture-tools
.. image:: https://pypip.in/v/pytest-fixture-tools/badge.png
   :target: https://crate.io/packages/pytest-fixture-tools/
.. image:: https://coveralls.io/repos/paylogic/pytest-fixture-tools/badge.png?branch=master
   :target: https://coveralls.io/r/paylogic/pytest-fixture-tools

pytest-fixture-tools: Pytest fixture tools plugin
===============================================================

The ``pytest-fixture-tools`` package is a pytest plugin which provides various tools for fixture.


Installation
------------

.. sourcecode::

    pip install pytest-fixture-tools


Usage
-----

If you have already installed ``pytest-fixture-tools`` plugin then you can use one of its commands.

``--show-fixture-duplicates`` - will collect all fixtures and print you a list of duplicates for each fixture.
With ``--show-fixture-duplicates`` you can use ``--fixture name_of_fixture`` option to get list of duplicates only for specific fixture

.. sourcecode::

    py.test tests/ --show-fixture-duplicates --fixture order

    # output
    ============================================================================================ test session starts ============================================================================================
    platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/batman/.virtualenvs/arkham-city/bin/python
    Tests are shuffled using seed number 355495648184.
    cachedir: /home/batman/.virtualenvs/arkham-city/.cache
    plugins: fixture-tools, random, bdd-splinter, pep8, cov, contextfixture, bdd, xdist, instafail, cache
    collected 2347 items / 1 skipped

    --------------------------------------------------------------------------------------------------- order ---------------------------------------------------------------------------------------------------
    tests/fixtures/order.py:30<commit_msg>Changed readme a little bit.<commit_after>.. image:: https://api.travis-ci.org/paylogic/pytest-fixture-tools.png
   :target: https://travis-ci.org/paylogic/pytest-fixture-tools
.. image:: https://pypip.in/v/pytest-fixture-tools/badge.png
   :target: https://crate.io/packages/pytest-fixture-tools/
.. image:: https://coveralls.io/repos/paylogic/pytest-fixture-tools/badge.png?branch=master
   :target: https://coveralls.io/r/paylogic/pytest-fixture-tools

pytest-fixture-tools: Pytest fixture tools plugin
===============================================================

The ``pytest-fixture-tools`` package is a pytest plugin which provides various tools for fixture.


Installation
------------

.. sourcecode::

    pip install pytest-fixture-tools


Usage
-----

If you have already installed ``pytest-fixture-tools`` plugin then you can use one of its commands.

``--show-fixture-duplicates`` - will collect all fixtures and print you a list of duplicates for each fixture.
With ``--show-fixture-duplicates`` you can use ``--fixture name_of_fixture`` option to get list of duplicates only for specific fixture

.. sourcecode::

    py.test tests/ --show-fixture-duplicates --fixture order

Output can look like this:

.. sourcecode::
    ============================================================================================ test session starts ============================================================================================
    platform linux2 -- Python 2.7.3 -- pytest-2.5.1 -- /home/batman/.virtualenvs/arkham-city/bin/python
    Tests are shuffled using seed number 355495648184.
    cachedir: /home/batman/.virtualenvs/arkham-city/.cache
    plugins: fixture-tools, random, bdd-splinter, pep8, cov, contextfixture, bdd, xdist, instafail, cache
    collected 2347 items / 1 skipped

    --------------------------------------------------------------------------------------------------- order ---------------------------------------------------------------------------------------------------
    tests/fixtures/order.py:30
{'fraction_non_alphanumeric': 0.3217455621301775, 'fraction_numerical': 0.013313609467455622, 'mean_word_length': 2.641831238779174, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '3125744', 'n_tokens_mistral': 1113, 'n_tokens_neox': 1057, 'n_words': 262}