pytest


Namepytest JSON
Version 3.1.0 PyPI version JSON
download
home_pagehttp://pytest.org
Summarypytest: simple powerful testing with Python
upload_time2017-05-22 21:54:45
maintainer
docs_urlNone
authorHolger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others
requires_python
licenseMIT license
keywords test unittest
VCS
bugtrack_url https://github.com/pytest-dev/pytest/issues
requirements No requirements were recorded.
Travis-CI No Travis.
Coveralis test coverage No Coveralis.
            .. image:: http://docs.pytest.org/en/latest/_static/pytest1.png
   :target: http://docs.pytest.org
   :align: center
   :alt: pytest

------

.. image:: https://img.shields.io/pypi/v/pytest.svg
    :target: https://pypi.python.org/pypi/pytest

.. image:: https://anaconda.org/conda-forge/pytest/badges/version.svg
    :target: https://anaconda.org/conda-forge/pytest

.. image:: https://img.shields.io/pypi/pyversions/pytest.svg
    :target: https://pypi.python.org/pypi/pytest

.. image:: https://img.shields.io/coveralls/pytest-dev/pytest/master.svg
    :target: https://coveralls.io/r/pytest-dev/pytest

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

.. image:: https://ci.appveyor.com/api/projects/status/mrgbjaua7t33pg6b?svg=true
    :target: https://ci.appveyor.com/project/pytestbot/pytest

The ``pytest`` framework makes it easy to write small tests, yet
scales to support complex functional testing for applications and libraries.

An example of a simple test:

.. code-block:: python

    # content of test_sample.py
    def inc(x):
        return x + 1

    def test_answer():
        assert inc(3) == 5


To execute it::

    $ pytest
    ============================= test session starts =============================
    collected 1 items

    test_sample.py F

    ================================== FAILURES ===================================
    _________________________________ test_answer _________________________________

        def test_answer():
    >       assert inc(3) == 5
    E       assert 4 == 5
    E        +  where 4 = inc(3)

    test_sample.py:5: AssertionError
    ========================== 1 failed in 0.04 seconds ===========================


Due to ``pytest``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <http://docs.pytest.org/en/latest/getting-started.html#our-first-test-run>`_ for more examples.


Features
--------

- Detailed info on failing `assert statements <http://docs.pytest.org/en/latest/assert.html>`_ (no need to remember ``self.assert*`` names);

- `Auto-discovery
  <http://docs.pytest.org/en/latest/goodpractices.html#python-test-discovery>`_
  of test modules and functions;

- `Modular fixtures <http://docs.pytest.org/en/latest/fixture.html>`_ for
  managing small or parametrized long-lived test resources;

- Can run `unittest <http://docs.pytest.org/en/latest/unittest.html>`_ (or trial),
  `nose <http://docs.pytest.org/en/latest/nose.html>`_ test suites out of the box;

- Python2.6+, Python3.3+, PyPy-2.3, Jython-2.5 (untested);

- Rich plugin architecture, with over 150+ `external plugins <http://docs.pytest.org/en/latest/plugins.html#installing-external-plugins-searching>`_ and thriving community;


Documentation
-------------

For full documentation, including installation, tutorials and PDF documents, please see http://docs.pytest.org.


Bugs/Requests
-------------

Please use the `GitHub issue tracker <https://github.com/pytest-dev/pytest/issues>`_ to submit bugs or request features.


Changelog
---------

Consult the `Changelog <http://docs.pytest.org/en/latest/changelog.html>`__ page for fixes and enhancements of each version.


License
-------

Copyright Holger Krekel and others, 2004-2016.

Distributed under the terms of the `MIT`_ license, pytest is free and open source software.

.. _`MIT`: https://github.com/pytest-dev/pytest/blob/master/LICENSE
            

Raw data

            {
    "maintainer": "", 
    "docs_url": null, 
    "requires_python": "", 
    "maintainer_email": "", 
    "cheesecake_code_kwalitee_id": null, 
    "keywords": "test unittest", 
    "upload_time": "2017-05-22 21:54:45", 
    "author": "Holger Krekel, Bruno Oliveira, Ronny Pfannschmidt, Floris Bruynooghe, Brianna Laugher, Florian Bruhin and others", 
    "home_page": "http://pytest.org", 
    "download_url": "https://pypi.python.org/packages/50/e2/a28d4c5e4520a0427bc5141703f3296184742e7cb2722ce71fd61020c417/pytest-3.1.0.tar.gz", 
    "platform": "", 
    "version": "3.1.0", 
    "cheesecake_documentation_id": null, 
    "description": ".. image:: http://docs.pytest.org/en/latest/_static/pytest1.png\n   :target: http://docs.pytest.org\n   :align: center\n   :alt: pytest\n\n------\n\n.. image:: https://img.shields.io/pypi/v/pytest.svg\n    :target: https://pypi.python.org/pypi/pytest\n\n.. image:: https://anaconda.org/conda-forge/pytest/badges/version.svg\n    :target: https://anaconda.org/conda-forge/pytest\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest.svg\n    :target: https://pypi.python.org/pypi/pytest\n\n.. image:: https://img.shields.io/coveralls/pytest-dev/pytest/master.svg\n    :target: https://coveralls.io/r/pytest-dev/pytest\n\n.. image:: https://travis-ci.org/pytest-dev/pytest.svg?branch=master\n    :target: https://travis-ci.org/pytest-dev/pytest\n\n.. image:: https://ci.appveyor.com/api/projects/status/mrgbjaua7t33pg6b?svg=true\n    :target: https://ci.appveyor.com/project/pytestbot/pytest\n\nThe ``pytest`` framework makes it easy to write small tests, yet\nscales to support complex functional testing for applications and libraries.\n\nAn example of a simple test:\n\n.. code-block:: python\n\n    # content of test_sample.py\n    def inc(x):\n        return x + 1\n\n    def test_answer():\n        assert inc(3) == 5\n\n\nTo execute it::\n\n    $ pytest\n    ============================= test session starts =============================\n    collected 1 items\n\n    test_sample.py F\n\n    ================================== FAILURES ===================================\n    _________________________________ test_answer _________________________________\n\n        def test_answer():\n    >       assert inc(3) == 5\n    E       assert 4 == 5\n    E        +  where 4 = inc(3)\n\n    test_sample.py:5: AssertionError\n    ========================== 1 failed in 0.04 seconds ===========================\n\n\nDue to ``pytest``'s detailed assertion introspection, only plain ``assert`` statements are used. See `getting-started <http://docs.pytest.org/en/latest/getting-started.html#our-first-test-run>`_ for more examples.\n\n\nFeatures\n--------\n\n- Detailed info on failing `assert statements <http://docs.pytest.org/en/latest/assert.html>`_ (no need to remember ``self.assert*`` names);\n\n- `Auto-discovery\n  <http://docs.pytest.org/en/latest/goodpractices.html#python-test-discovery>`_\n  of test modules and functions;\n\n- `Modular fixtures <http://docs.pytest.org/en/latest/fixture.html>`_ for\n  managing small or parametrized long-lived test resources;\n\n- Can run `unittest <http://docs.pytest.org/en/latest/unittest.html>`_ (or trial),\n  `nose <http://docs.pytest.org/en/latest/nose.html>`_ test suites out of the box;\n\n- Python2.6+, Python3.3+, PyPy-2.3, Jython-2.5 (untested);\n\n- Rich plugin architecture, with over 150+ `external plugins <http://docs.pytest.org/en/latest/plugins.html#installing-external-plugins-searching>`_ and thriving community;\n\n\nDocumentation\n-------------\n\nFor full documentation, including installation, tutorials and PDF documents, please see http://docs.pytest.org.\n\n\nBugs/Requests\n-------------\n\nPlease use the `GitHub issue tracker <https://github.com/pytest-dev/pytest/issues>`_ to submit bugs or request features.\n\n\nChangelog\n---------\n\nConsult the `Changelog <http://docs.pytest.org/en/latest/changelog.html>`__ page for fixes and enhancements of each version.\n\n\nLicense\n-------\n\nCopyright Holger Krekel and others, 2004-2016.\n\nDistributed under the terms of the `MIT`_ license, pytest is free and open source software.\n\n.. _`MIT`: https://github.com/pytest-dev/pytest/blob/master/LICENSE", 
    "lcname": "pytest", 
    "bugtrack_url": "https://github.com/pytest-dev/pytest/issues", 
    "github": false, 
    "name": "pytest", 
    "license": "MIT license", 
    "summary": "pytest: simple powerful testing with Python", 
    "split_keywords": [
        "test", 
        "unittest"
    ], 
    "author_email": "", 
    "urls": [
        {
            "has_sig": false, 
            "upload_time": "2017-05-22T21:54:38", 
            "comment_text": "", 
            "python_version": "2.7", 
            "url": "https://pypi.python.org/packages/55/9c/5529093be0f518fe710d5b925680429c24810dadd6519c0ca86435656e85/pytest-3.1.0-py2.py3-none-any.whl", 
            "md5_digest": "7343ec3cb88369474bbc5f8a66a69bac", 
            "downloads": 0, 
            "filename": "pytest-3.1.0-py2.py3-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "55/9c/5529093be0f518fe710d5b925680429c24810dadd6519c0ca86435656e85/pytest-3.1.0-py2.py3-none-any.whl", 
            "size": 178702
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-05-22T21:54:45", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/50/e2/a28d4c5e4520a0427bc5141703f3296184742e7cb2722ce71fd61020c417/pytest-3.1.0.tar.gz", 
            "md5_digest": "11b609d38edff58bceca8c18efe19078", 
            "downloads": 0, 
            "filename": "pytest-3.1.0.tar.gz", 
            "packagetype": "sdist", 
            "path": "50/e2/a28d4c5e4520a0427bc5141703f3296184742e7cb2722ce71fd61020c417/pytest-3.1.0.tar.gz", 
            "size": 760912
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}