{ "info": { "author": "Ulrich Petri", "author_email": "ulo@ulo.pe", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Plugins", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7" ], "description": "pytest-select\n=============\n\n|PyPI pyversions| |PyPI license| |PyPI version| |CircleCI build| |Codecov result|\n\n.. |PyPI version| image:: https://img.shields.io/pypi/v/pytest-select.svg\n :target: https://pypi.org/project/pytest-select/\n.. |PyPI license| image:: https://img.shields.io/pypi/l/pytest-select.svg\n :target: https://pypi.python.org/pypi/pytest-select/\n.. |PyPI pyversions| image:: https://img.shields.io/pypi/pyversions/pytest-select.svg\n :target: https://pypi.python.org/pypi/pytest-select/\n.. |CircleCI build| image:: https://img.shields.io/circleci/project/github/ulope/pytest-select/master.svg?logo=circleci\n :target: https://circleci.com/gh/ulope/pytest-select/\n.. |Codecov result| image:: https://img.shields.io/codecov/c/github/ulope/pytest-select/master.svg?logo=codecov\n :target: https://codecov.io/gh/ulope/pytest-select\n\n\nThis is a `pytest`_ plugin which allows to (de-)select tests by name from a list loaded from a file.\n\n.. _pytest: https://pytest.org\n\n\nInstallation\n------------\n\nIt's recommended to install this package from PyPI::\n\n pip install pytest-select\n\n\nUsage\n-----\n\nThis plugin adds new command line options to pytest:\n\n- ``--select-from-file``\n- ``--deselect-from-file``\n- ``--select-fail-on-missing``\n\nThe first two both expect an argument that resolves to a UTF-8 encoded text file containing one test name per\nline.\n\nThe third one changes the behaviour in case (de-)selected test names are missing from the to-be executed tests.\nBy default a warning is emitted and the remaining selected tests are executed as normal.\nBy using the ``--select-fail-on-missing`` flag this behaviour can be changed to instead abort execution in that case.\n\nTest names are expected in the same format as seen in the output of\n``pytest --collect-only --quiet`` for example.\n\nBoth plain test names or complete node ids (e.g. ``test_file.py::test_name``) are accepted.\n\nExample::\n\n $~ cat selection.txt\n test_something\n test_parametrized[1]\n tests/test_foo.py::test_other\n\n $~ pytest --select-from-file selection.txt\n $~ pytest --deselect-from-file selection.txt\n\n\nDevelopment\n-----------\n\nThis package uses Poetry_.\nTo setup a development environment install Poetry and then run::\n\n poetry install\n\n\n.. _Poetry: https://poetry.eustace.io\n\nQuestions\n---------\n\nWhy not use pytest's builtin ``-k`` option\n******************************************\n\nThe ``-k`` selection mechanism is (currently) unable to deal with selecting multiple parametrized\ntests and is also a bit fragile since it matches more than just the test name.\nAdditionally, depending on the number of tests, giving test names on the command line can overflow\nthe maximum command length.\n\nWhat is this useful for\n***********************\n\nThe author uses this plugin to `split tests across workers`_ on `Circle CI`_.\n\nExample::\n\n pytest --collect-only --quiet | \\\n grep '::' | \\\n circleci tests split --split-by=timings --timings-type=testname > selected.txt\n pytest --select-from-file selected.txt\n\n.. _Circle CI: https://circleci.com\n.. _split tests across workers: https://circleci.com/docs/2.0/parallelism-faster-jobs/#splitting-test-files\n\n\nVersion History\n---------------\n\n- ``v0.1.2`` - 2019-01-18:\n - Add informational pytest header report output\n- ``v0.1.1`` - 2018-12-10:\n - Add ``--select-fail-on-missing`` option\n - Add basic mutation testing\n- ``v0.1.0post0`` - 2018-12-08:\n - Fix README\n- ``v0.1.0`` - 2018-12-08:\n - Initial release\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ulope/pytest-select", "keywords": "pytest,test,plugin", "license": "MIT", "maintainer": "Ulrich Petri", "maintainer_email": "ulo@ulo.pe", "name": "pytest-select", "package_url": "https://pypi.org/project/pytest-select/", "platform": "", "project_url": "https://pypi.org/project/pytest-select/", "project_urls": { "Homepage": "https://github.com/ulope/pytest-select", "Repository": "https://github.com/ulope/pytest-select" }, "release_url": "https://pypi.org/project/pytest-select/0.1.2/", "requires_dist": [ "pytest (>=3.0)" ], "requires_python": ">=3.6", "summary": "A pytest plugin which allows to (de-)select tests from a file.", "version": "0.1.2" }, "last_serial": 4712778, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f6e8a0f56193efb3a3246e215924f661", "sha256": "998d991d13c54c3b3ffd180596a0a54f286583e06537550bb499f4e50ce17f57" }, "downloads": -1, "filename": "pytest_select-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f6e8a0f56193efb3a3246e215924f661", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 5559, "upload_time": "2018-12-08T00:02:54", "url": "https://files.pythonhosted.org/packages/5a/0e/01959cb0f4230ba55f603ad094f5c0b3a5e53252411e9583128cb5c20e4e/pytest_select-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c22a52821f3e4c0833f0ea0663c485d9", "sha256": "56bed91c87acd9ae6013a194091cb9694e1b0044bd3978a2d739f92fd4a52c40" }, "downloads": -1, "filename": "pytest-select-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c22a52821f3e4c0833f0ea0663c485d9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 3465, "upload_time": "2018-12-08T00:02:52", "url": "https://files.pythonhosted.org/packages/f4/25/91c3056608835f9280374ef8775999edaaaf5d1f40704f31e5ceb63029f5/pytest-select-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "e7d491d9987796ce879d19ff1952f9bf", "sha256": "9f6efd8101262d0eabbc4ffcb6f4e1b67a174e4f3b572486919209324e13d84b" }, "downloads": -1, "filename": "pytest_select-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e7d491d9987796ce879d19ff1952f9bf", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 6365, "upload_time": "2018-12-10T15:12:15", "url": "https://files.pythonhosted.org/packages/91/3e/7d1733457c7ff640bc6b26ffd8c3e4ab2cd76b3a9d6a9d5eefe028344733/pytest_select-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "193aad1042b1fa86bf60eaaa7141abf8", "sha256": "5ea19315b394c8c7808528cfadc2257d4e1a4ab9983bd4cb2ecb67bb045d7ebc" }, "downloads": -1, "filename": "pytest-select-0.1.1.tar.gz", "has_sig": false, "md5_digest": "193aad1042b1fa86bf60eaaa7141abf8", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4026, "upload_time": "2018-12-10T15:12:14", "url": "https://files.pythonhosted.org/packages/5e/5f/1d761318c1c5d07e83e37e30ed2ac31ce8e599c57d686ac504a84b8cb199/pytest-select-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "ee88d14c847eca34acd5ee97aba1398b", "sha256": "dd4068204397efe8fcaa50f63305956f80a8ac90f4620888b7c46ebc3b00027b" }, "downloads": -1, "filename": "pytest_select-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ee88d14c847eca34acd5ee97aba1398b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7529, "upload_time": "2019-01-18T15:55:49", "url": "https://files.pythonhosted.org/packages/03/c6/f07fbbefda11038f14607d1f1ba80f9e8bdaae1a291dee04db8514b481fb/pytest_select-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "338c56bb6f8361b2b09375c18e9ba9f0", "sha256": "146aaaf294034f64cc0326448d04c03fa53df197248c9874712f21a919ce414e" }, "downloads": -1, "filename": "pytest-select-0.1.2.tar.gz", "has_sig": false, "md5_digest": "338c56bb6f8361b2b09375c18e9ba9f0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4273, "upload_time": "2019-01-18T15:55:47", "url": "https://files.pythonhosted.org/packages/74/b6/e9b6115204789b476aee3e7f8993d4e70c73f37f44379f555bcd83b1a63c/pytest-select-0.1.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ee88d14c847eca34acd5ee97aba1398b", "sha256": "dd4068204397efe8fcaa50f63305956f80a8ac90f4620888b7c46ebc3b00027b" }, "downloads": -1, "filename": "pytest_select-0.1.2-py3-none-any.whl", "has_sig": false, "md5_digest": "ee88d14c847eca34acd5ee97aba1398b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 7529, "upload_time": "2019-01-18T15:55:49", "url": "https://files.pythonhosted.org/packages/03/c6/f07fbbefda11038f14607d1f1ba80f9e8bdaae1a291dee04db8514b481fb/pytest_select-0.1.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "338c56bb6f8361b2b09375c18e9ba9f0", "sha256": "146aaaf294034f64cc0326448d04c03fa53df197248c9874712f21a919ce414e" }, "downloads": -1, "filename": "pytest-select-0.1.2.tar.gz", "has_sig": false, "md5_digest": "338c56bb6f8361b2b09375c18e9ba9f0", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6", "size": 4273, "upload_time": "2019-01-18T15:55:47", "url": "https://files.pythonhosted.org/packages/74/b6/e9b6115204789b476aee3e7f8993d4e70c73f37f44379f555bcd83b1a63c/pytest-select-0.1.2.tar.gz" } ] }