pytest


Namepytest JSON
Version 3.0.6 PyPI version JSON
home_pagehttp://pytest.org
Summarypytest: simple powerful testing with Python
upload_time2017-01-22 21:15:32
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://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-01-22 21:15:32", 
    "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/68/9c/c06dc051b39b817efd31e4c589df7780f7b287d96fab67e90be1f614fc0a/pytest-3.0.6.tar.gz", 
    "platform": "unix", 
    "version": "3.0.6", 
    "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.. image:: https://img.shields.io/pypi/pyversions/pytest.svg\n  :target: https://pypi.python.org/pypi/pytest\n.. image:: https://img.shields.io/coveralls/pytest-dev/pytest/master.svg\n   :target: https://coveralls.io/r/pytest-dev/pytest\n.. image:: https://travis-ci.org/pytest-dev/pytest.svg?branch=master\n    :target: https://travis-ci.org/pytest-dev/pytest\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\n\n\n", 
    "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-01-22T21:15:29", 
            "comment_text": "", 
            "python_version": "py2.py3", 
            "url": "https://pypi.python.org/packages/c4/17/73e8eda8fbc18b8421a8b16be8bbbb2a461f4d2405f3628beb8e5d2ca567/pytest-3.0.6-py2.py3-none-any.whl", 
            "md5_digest": "0fe6fd8b448542047e153bb788d4f360", 
            "downloads": 0, 
            "filename": "pytest-3.0.6-py2.py3-none-any.whl", 
            "packagetype": "bdist_wheel", 
            "path": "c4/17/73e8eda8fbc18b8421a8b16be8bbbb2a461f4d2405f3628beb8e5d2ca567/pytest-3.0.6-py2.py3-none-any.whl", 
            "size": 172198
        }, 
        {
            "has_sig": false, 
            "upload_time": "2017-01-22T21:15:32", 
            "comment_text": "", 
            "python_version": "source", 
            "url": "https://pypi.python.org/packages/68/9c/c06dc051b39b817efd31e4c589df7780f7b287d96fab67e90be1f614fc0a/pytest-3.0.6.tar.gz", 
            "md5_digest": "6639592fa430567d024189f097fcdbd7", 
            "downloads": 0, 
            "filename": "pytest-3.0.6.tar.gz", 
            "packagetype": "sdist", 
            "path": "68/9c/c06dc051b39b817efd31e4c589df7780f7b287d96fab67e90be1f614fc0a/pytest-3.0.6.tar.gz", 
            "size": 748748
        }
    ], 
    "_id": null, 
    "cheesecake_installability_id": null
}