{ "info": { "author": "Reece Hart", "author_email": "reecehart@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Testing" ], "description": "pytest-optional-tests\n=====================\n\n.. image:: https://img.shields.io/pypi/v/pytest-optional-tests.svg\n :target: https://pypi.org/project/pytest-optional-tests\n :alt: PyPI version\n\n.. image:: https://img.shields.io/pypi/pyversions/pytest-optional-tests.svg\n :target: https://pypi.org/project/pytest-optional-tests\n :alt: Python versions\n\n.. image:: https://travis-ci.org/reece/pytest-optional-tests.svg?branch=master\n :target: https://travis-ci.org/reece/pytest-optional-tests\n :alt: See Build Status on Travis CI\n\n\nProvides easy declaration of optional tests using pytest markers.\nOptional tests are run only on request via the config file or command\nline.\n\n----\n\nMotivation\n----------\n\nSome classes of tests should not be run with every test invocation.\nIt is often useful to define tests that be run only when specifically\nrequested, such as tests that are slow, require network access, or\nwork only in certain environments.\n\nPytest provides mechanisms to run tests based on test names (-k) and\nto filter tests based on markers (-m). Neither mechanism makes it\neasy to surpress certain tests by default. For example, one might\ndecorate tests with `@pytest.mark.network`, but disabling it by\ndefault requires a marker expression like `-m \"not network\"` with\nevery invocation. Markers and marker expressions become unwieldy when\nthere are many markers.\n\nThis plugin enables users to declare that certain markers are\n\"optional markers\". When tests are decorated with an optional marker,\nthe test is skipped by default. Tests may be decorated with multiple\nmarkers, including multiple optional markers. Optional tests may be\nenabled in the pytest ini file or the command line.\n\n\nInstallation\n------------\n\nYou can install \"pytest-optional-tests\" via `pip`_ from `PyPI`_::\n\n $ pip install pytest-optional-tests\n\n\nUsage\n-----\n\nOptional markers must be declared in inicfg using the same syntax as\nthe markers option. For example::\n\n [pytest]\n optional_tests:\n slow: slow tests\n network: network tests\n bug: regression tests against previous bugs\n\nOptional markers should NOT be declared using the `markers` attribute,\neven when using pytest's `strict` mode. \n\nOptional test decorators are pytest markers, and the semantics are\nidentical.\n\nIf a test is decorated with multiple optional markers, the test will\nbe executed when any of the markers is requested. For example::\n\n @pytest.mark.network\n @pytest.mark.slow\n def test_slow_network_function(): ...\n\nwill be tested if either or both of the optional `slow` or `network`\ntests are requested.\n\nOptional tests may be requested in the inicfg::\n\n [pytest]\n optional_tests:\n slow: slow tests\n network: network tests\n bug: regression tests against previous bugs\n run_optional_tests=network,slow\n\nor on the command line::\n\n pytest --run-option-tests=network,slow\n\n\n\n\nContributing\n------------\nContributions are very welcome. Tests can be run with `tox`_, please ensure\nthe coverage at least stays the same before you submit a pull request.\n\nLicense\n-------\n\nDistributed under the terms of the `MIT`_ license.\n\n\nIssues\n------\n\nIf you encounter any problems, please `file an issue`_ along with a detailed description.\n\n\n\nThis `pytest`_ plugin was generated with `Cookiecutter`_ along with `@hackebrot`_'s `cookiecutter-pytest-plugin`_ template.\n\n\n.. _`Cookiecutter`: https://github.com/audreyr/cookiecutter\n.. _`@hackebrot`: https://github.com/hackebrot\n.. _`MIT`: http://opensource.org/licenses/MIT\n.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause\n.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt\n.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0\n.. _`cookiecutter-pytest-plugin`: https://github.com/pytest-dev/cookiecutter-pytest-plugin\n.. _`file an issue`: https://github.com/reece/pytest-optional-tests/issues\n.. _`pytest`: https://github.com/pytest-dev/pytest\n.. _`tox`: https://tox.readthedocs.io/en/latest/\n.. _`pip`: https://pypi.org/project/pip/\n.. _`PyPI`: https://pypi.org/project\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/reece/pytest-optional-tests", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-optional-tests", "package_url": "https://pypi.org/project/pytest-optional-tests/", "platform": "any", "project_url": "https://pypi.org/project/pytest-optional-tests/", "project_urls": { "Homepage": "https://github.com/reece/pytest-optional-tests" }, "release_url": "https://pypi.org/project/pytest-optional-tests/0.1.1/", "requires_dist": [ "pytest (>=4.5.0)" ], "requires_python": ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "summary": "Easy declaration of optional tests (i.e., that are not run by default)", "version": "0.1.1" }, "last_serial": 5504211, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "23ff9dc7a3e426f1f34ee044f900bf75", "sha256": "3b10d21125da27c861db85936b67fdbf24a6a5a7d266355cfc630cbd0a3f885e" }, "downloads": -1, "filename": "pytest_optional_tests-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "23ff9dc7a3e426f1f34ee044f900bf75", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 4016, "upload_time": "2019-07-09T01:14:15", "url": "https://files.pythonhosted.org/packages/4b/be/c960b7a8e5c866781a0cc5a3e589f9c10f5834ea31c18679f37f2b6df65e/pytest_optional_tests-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c1b1bbfc58d09a9aa144e282d4121f28", "sha256": "6fc142f16183a3f8fb1acf7d2fec426049c4cb094dd9ee17bff891b9c2394d73" }, "downloads": -1, "filename": "pytest-optional-tests-0.1.0.tar.gz", "has_sig": false, "md5_digest": "c1b1bbfc58d09a9aa144e282d4121f28", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 7135, "upload_time": "2019-07-09T01:14:18", "url": "https://files.pythonhosted.org/packages/70/78/ecd8c7032743423f39b40be9b2e2952733770a1f9e301cb871b42663e731/pytest-optional-tests-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "2dd71448a873e85c4aec0cf39283e920", "sha256": "ededc9d2aa7051d1af8ff5e757119b5758d86c7f24e73e1bb7dd5f19cd2031fa" }, "downloads": -1, "filename": "pytest_optional_tests-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2dd71448a873e85c4aec0cf39283e920", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 5466, "upload_time": "2019-07-09T01:24:29", "url": "https://files.pythonhosted.org/packages/f2/4a/7726bed4f1fda2f4af35d1b8d774169aa0103f0141abe3fb3ba7761efa86/pytest_optional_tests-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9fba2b9d28425bce70916c5f36991e2", "sha256": "7f4411bf1551b556ae24a7e1385c4832d7520ccef109c374929aa71afe8c6754" }, "downloads": -1, "filename": "pytest-optional-tests-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e9fba2b9d28425bce70916c5f36991e2", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 7569, "upload_time": "2019-07-09T01:24:30", "url": "https://files.pythonhosted.org/packages/b3/0d/e0ed3c137ac8b604d0a90aa4a23e50ef21a66320b50a6a9b2c5f41e5a986/pytest-optional-tests-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2dd71448a873e85c4aec0cf39283e920", "sha256": "ededc9d2aa7051d1af8ff5e757119b5758d86c7f24e73e1bb7dd5f19cd2031fa" }, "downloads": -1, "filename": "pytest_optional_tests-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "2dd71448a873e85c4aec0cf39283e920", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 5466, "upload_time": "2019-07-09T01:24:29", "url": "https://files.pythonhosted.org/packages/f2/4a/7726bed4f1fda2f4af35d1b8d774169aa0103f0141abe3fb3ba7761efa86/pytest_optional_tests-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e9fba2b9d28425bce70916c5f36991e2", "sha256": "7f4411bf1551b556ae24a7e1385c4832d7520ccef109c374929aa71afe8c6754" }, "downloads": -1, "filename": "pytest-optional-tests-0.1.1.tar.gz", "has_sig": false, "md5_digest": "e9fba2b9d28425bce70916c5f36991e2", "packagetype": "sdist", "python_version": "source", "requires_python": ">= 2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*", "size": 7569, "upload_time": "2019-07-09T01:24:30", "url": "https://files.pythonhosted.org/packages/b3/0d/e0ed3c137ac8b604d0a90aa4a23e50ef21a66320b50a6a9b2c5f41e5a986/pytest-optional-tests-0.1.1.tar.gz" } ] }