{ "info": { "author": "not-raspberry", "author_email": "unittestablecode@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Testing" ], "description": "pytest_reorder |status| |version| |pythons| |coverage|\n======================================================\n\n.. |status| image:: https://travis-ci.org/not-raspberry/pytest_reorder.svg?branch=master\n :target: https://travis-ci.org/not-raspberry/pytest_reorder\n\n.. |version| image:: https://img.shields.io/pypi/v/pytest_reorder.svg?maxAge=2592000\n :target: https://pypi.python.org/pypi/pytest-reorder\n\n.. |pythons| image:: https://img.shields.io/pypi/pyversions/pytest_reorder.svg?maxAge=2592000\n\n.. |coverage| image:: https://coveralls.io/repos/github/not-raspberry/pytest_reorder/badge.svg?branch=master\n :target: https://coveralls.io/github/not-raspberry/pytest_reorder?branch=master\n\nReorder tests depending on their nodeids (strings of test file path plus test name plus\nparametrization, like:\n``test/test_prefix_reordering.py::test_reordering_default[test_names5-expected_test_order5]``).\n\nNormally tests are sorted alphabetically. That makes integration tests run before unit tests.\n\nWith **pytest_reorder** you can install a hook that will change the order of tests in the suite.\nBy default **pytest_reorder** will seek for *unit*, *integration* and *ui* tests and put them in\nthe following order:\n\n#. *unit*\n#. all tests with names not indicating unit, integration, nor UI tests\n#. *integration*\n#. *ui*\n\nThe default regular expressions can find unit, integration and UI tests both laid flat and **deeply\nnested**. You can also specify your custom order.\n\n\nHOWTO\n-----\n\nIt's possible to customize the ordering. To do so, you have to specify your custom tests order\nby passing a list of regular expresions that match tests' nodeids. If more than one regex matches\nsome test nodeid, the first one wins.\n\nCommand line interface\n~~~~~~~~~~~~~~~~~~~~~~\n\n**pytest_reorder** hooks in a ``--reorder`` command line option that takes zero arguments or an\nordering spec list.\n\n#. If no arguments are given, default reordering will be applied.\n#. If a list is passed, e.g. ``--reorder '(^|.*/)(test_)?unit' '*' '(^|.*/)(test_)?web'``, tests\n are reordered to go as the matches in the list do. Regular list items are treated as Python\n regexes. The special ``'*'`` match is required and specifies where to put tests that don't\n match any of the regexes. A single asterisk was chosen for that because it's not a valid regular\n expression.\n\nProgrammatic interface\n~~~~~~~~~~~~~~~~~~~~~~\n\nModify your main conftest file (e.g. ``tests/conftest.py``) to include:\n\n.. code:: python\n\n from pytest_reorder import default_reordering_hook as pytest_collection_modifyitems # add noqa here if you use pyflakes\n\nor specify a custom test order:\n\n.. code:: python\n\n from pytest_reorder import make_reordering_hook\n # Make unit tests run before 'db' tests, which run before 'web' tests. Other tests will run at\n # the very beginning of the suite:\n pytest_collection_modifyitems = make_reordering_hook(\n [None, r'(^|.*/)(test_)?unit', r'(^|.*/)(test_)?db', r'(^|.*/)(test_)?web'])\n\n\nWithout pytest_reorder\n----------------------\n\nFlat:\n\n.. code::\n\n sample_test_suites/flat/test_sample.py ...\n sample_test_suites/flat/integration/test_some_integration.py ..\n sample_test_suites/flat/ui/test_some_ui.py .\n sample_test_suites/flat/unit/test_some_unit.py ..\n\n\nNested:\n\n.. code::\n\n sample_test_suites/nested/app_1/tests/integration/test_some_integration.py ..\n sample_test_suites/nested/app_1/tests/ui/test_some_ui.py .\n sample_test_suites/nested/app_1/tests/unit/test_some_unit.py ..\n sample_test_suites/nested/app_2/tests/test_sth.py ...\n sample_test_suites/nested/app_2/tests/test_unit.py .\n\n\nWith pytest_reorder\n-------------------\n\nFlat:\n\n.. code::\n\n sample_test_suites/flat/unit/test_some_unit.py ..\n sample_test_suites/flat/test_sample.py ...\n sample_test_suites/flat/integration/test_some_integration.py ..\n sample_test_suites/flat/ui/test_some_ui.py .\n\n\nNested:\n\n.. code::\n\n sample_test_suites/nested/app_1/tests/unit/test_some_unit.py ..\n sample_test_suites/nested/app_2/tests/test_unit.py .\n sample_test_suites/nested/app_2/tests/test_sth.py ...\n sample_test_suites/nested/app_1/tests/integration/test_some_integration.py ..\n sample_test_suites/nested/app_1/tests/ui/test_some_ui.py .\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/not-raspberry/pytest_reorder", "keywords": "pytest order reorder test", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-reorder", "package_url": "https://pypi.org/project/pytest-reorder/", "platform": "", "project_url": "https://pypi.org/project/pytest-reorder/", "project_urls": { "Homepage": "https://github.com/not-raspberry/pytest_reorder" }, "release_url": "https://pypi.org/project/pytest-reorder/0.1.1/", "requires_dist": [ "pytest", "pylama (==7.4.3); extra == 'tests'", "pytest (==3.6.0); extra == 'tests'", "mock (==2.0.0); extra == 'tests'" ], "requires_python": "", "summary": "Reorder tests depending on their paths and names.", "version": "0.1.1" }, "last_serial": 3916536, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "fa4952fd30376aa801ab647f80c5fb11", "sha256": "3efae0bd26d464362a57c8f6d0b03e1905c696d5a00533abc12e52e835dcd842" }, "downloads": -1, "filename": "pytest_reorder-0.1.0.tar.gz", "has_sig": false, "md5_digest": "fa4952fd30376aa801ab647f80c5fb11", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5120, "upload_time": "2016-04-10T12:22:40", "url": "https://files.pythonhosted.org/packages/ea/51/050ecf04d75c300b4321fb5cf6c82206c5577d45edb0f9082942f759ecb5/pytest_reorder-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "eaa977d137fbd31f8ef38bc6e6809e36", "sha256": "1fca553ffb965e10192716208a94239a67ba2ffbe441c47665075ef7f1351500" }, "downloads": -1, "filename": "pytest_reorder-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "eaa977d137fbd31f8ef38bc6e6809e36", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5671, "upload_time": "2018-05-31T10:47:38", "url": "https://files.pythonhosted.org/packages/4d/7e/35dacdd38028efe9a575ac1d87ed31f39920940d84dd6094f70c3ae28301/pytest_reorder-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5aab7366aefbd3f04ab0b28648983bd", "sha256": "298f7c90d6d9a2d1bccf5775258b343e928df544e56a9be7e450bfca4fe09d7e" }, "downloads": -1, "filename": "pytest_reorder-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a5aab7366aefbd3f04ab0b28648983bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5853, "upload_time": "2018-05-31T10:47:40", "url": "https://files.pythonhosted.org/packages/7b/f0/18e7606c7219665825d7baff768950b4c4e84cdfd5cff159f1aa5bcea90d/pytest_reorder-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "eaa977d137fbd31f8ef38bc6e6809e36", "sha256": "1fca553ffb965e10192716208a94239a67ba2ffbe441c47665075ef7f1351500" }, "downloads": -1, "filename": "pytest_reorder-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "eaa977d137fbd31f8ef38bc6e6809e36", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5671, "upload_time": "2018-05-31T10:47:38", "url": "https://files.pythonhosted.org/packages/4d/7e/35dacdd38028efe9a575ac1d87ed31f39920940d84dd6094f70c3ae28301/pytest_reorder-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5aab7366aefbd3f04ab0b28648983bd", "sha256": "298f7c90d6d9a2d1bccf5775258b343e928df544e56a9be7e450bfca4fe09d7e" }, "downloads": -1, "filename": "pytest_reorder-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a5aab7366aefbd3f04ab0b28648983bd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5853, "upload_time": "2018-05-31T10:47:40", "url": "https://files.pythonhosted.org/packages/7b/f0/18e7606c7219665825d7baff768950b4c4e84cdfd5cff159f1aa5bcea90d/pytest_reorder-0.1.1.tar.gz" } ] }