{ "info": { "author": "Adam Johnson", "author_email": "me@adamj.eu", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Pytest", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6" ], "description": "===============\npytest-restrict\n===============\n\n.. image:: https://img.shields.io/travis/adamchainz/pytest-restrict.svg\n :target: https://travis-ci.org/adamchainz/pytest-restrict\n\n.. image:: https://img.shields.io/pypi/v/pytest-restrict.svg\n :target: https://pypi.python.org/pypi/pytest-restrict\n\nPytest plugin to restrict the test types allowed.\n\nFeatures\n--------\n\nThis plugin allows you to restrict the test types allowed to ensure they\ninherit from one of a given list of classes. You might need this on large\nprojects where you have custom test classes that developers might forget about.\n\nAbout\n-----\n\nI developed this feature in a closed source Nose plugin whilst working on the\nbig Django project at YPlan. We had some custom enhancements and fixes on top\nof the Django test classes, but developers sometimes forgot about using them\nand instead used the built-in ``unittest`` classes, or the plain Django ones.\nOur solution was to just make the test runner blow up if it encountered\nnon-whitelisted test types. This is a Pytest port of that plugin.\n\nUsage\n-----\n\nInstall from pip with:\n\n.. code-block:: bash\n\n pip install pytest-restrict\n\nPython 3.4+ supported.\n\nPytest will automatically find the plugin and use it when you run ``py.test``,\nhowever by default there are no restrictions. To restrict the test types,\nprovide ``--restrict-types`` as a comma-separated list of import paths to\nallowable test case base classes, for example:\n\n.. code-block:: bash\n\n # Allow only test cases that inherit from Django\n py.test --restrict-types django.test.TestCase,django.test.SimpleTestCase\n\nIf you wish to allow function tests and other non-class test types (e.g.\ndoctests), provide the special string 'None', for example:\n\n.. code-block:: sh\n\n # Allow function tests and our custom tests\n py.test --restrict-types None,myproject.test.TestCase\n\n\n\n\nHistory\n-------\n\nPending Release\n---------------\n\n.. Insert new release notes below this line\n\n3.0.0 (2018-02-28)\n------------------\n\n* Drop Python 2 support, only Python 3.4+ is supported now.\n\n2.0.0 (2016-04-29)\n------------------\n\n* Changed the format of ``--restrict-types`` to take a comma-separated list of\n import paths rather than space separated, which fixes the parsing of e.g.\n ``py.test --restrict-types my.TestCase run/these/test_files.py``.\n\n1.0.0 (2016-04-17)\n------------------\n\n* First release on PyPI\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/adamchainz/pytest-restrict", "keywords": "pytest,restrict,class", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "pytest-restrict", "package_url": "https://pypi.org/project/pytest-restrict/", "platform": "", "project_url": "https://pypi.org/project/pytest-restrict/", "project_urls": { "Homepage": "https://github.com/adamchainz/pytest-restrict" }, "release_url": "https://pypi.org/project/pytest-restrict/3.0.0/", "requires_dist": [ "pytest" ], "requires_python": ">=3.4", "summary": "Pytest plugin to restrict the test types allowed", "version": "3.0.0" }, "last_serial": 4877709, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "5e493692d7d25b61cc41ee43954a40c5", "sha256": "6d2cbdcdadf29159f136a9c81ad7841d864b44305b4c2ed4910d4210bcb113b3" }, "downloads": -1, "filename": "pytest_restrict-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "5e493692d7d25b61cc41ee43954a40c5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5211, "upload_time": "2016-04-17T19:00:20", "url": "https://files.pythonhosted.org/packages/c3/d3/cf5f1f1699e798a13955f3cb670f9449556c89948ae328cbdbaaaeb5c46f/pytest_restrict-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b3b8c7d643bd1d1ad3cea4ca2b79d745", "sha256": "54b4914b61d88888268da04e82302114ce114b1a2b8b1cb982ff1f55bae8474a" }, "downloads": -1, "filename": "pytest-restrict-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b3b8c7d643bd1d1ad3cea4ca2b79d745", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5138, "upload_time": "2016-04-17T19:00:28", "url": "https://files.pythonhosted.org/packages/8b/5f/3d706bc5b4744432ea3748281895cf57102be16fd6ce60e750f63fe2d24c/pytest-restrict-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "e384a8df204f0a01bdb4d22e7659e883", "sha256": "ddbd411bc8262cf0c972a9beb7ed03f29f05e5cd3743ce7afc640df9313306f3" }, "downloads": -1, "filename": "pytest_restrict-2.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "e384a8df204f0a01bdb4d22e7659e883", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5427, "upload_time": "2016-04-29T11:58:23", "url": "https://files.pythonhosted.org/packages/67/fb/2d81bff5fa790dd52c400a4f2ed2fb1ddd05114e1d4576fa21dd01151b11/pytest_restrict-2.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a459d05bd55e38a5fc5198ec44098623", "sha256": "8d063d1c8b581fd364d140b0621d00925a00e054869f1d3caa5d31ebb6865a0f" }, "downloads": -1, "filename": "pytest-restrict-2.0.0.tar.gz", "has_sig": false, "md5_digest": "a459d05bd55e38a5fc5198ec44098623", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5402, "upload_time": "2016-04-29T11:58:33", "url": "https://files.pythonhosted.org/packages/f9/78/3bd88ca4d938750383b3261f18c4d56c77af3b10f9826c76b03917574f59/pytest-restrict-2.0.0.tar.gz" } ], "3.0.0": [ { "comment_text": "", "digests": { "md5": "1e21a105ac306f4bb3f13472790a2f44", "sha256": "37fe4e4c6568c3997c60881e35bbeb36aeffce080899d686e4de7f27fd0dbc96" }, "downloads": -1, "filename": "pytest_restrict-3.0.0-py3-none-any.whl", "has_sig": true, "md5_digest": "1e21a105ac306f4bb3f13472790a2f44", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 4427, "upload_time": "2019-02-28T06:02:57", "url": "https://files.pythonhosted.org/packages/7a/15/b9e5cb5c8428452984453c57972ef3bd2e08654dcf5990197b8e69b6aef2/pytest_restrict-3.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a6615dbf1498b239954f4d31b17719e9", "sha256": "f3aade0b3aa67fe9fb5aa4f43006c741d34b5af2f6b2af43a7782d42280f94bd" }, "downloads": -1, "filename": "pytest-restrict-3.0.0.tar.gz", "has_sig": true, "md5_digest": "a6615dbf1498b239954f4d31b17719e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 5109, "upload_time": "2019-02-28T06:02:59", "url": "https://files.pythonhosted.org/packages/54/f7/1421298b12fea5aa0bbadd4efacc0c7cb8cdb09a28e69cd8e1943e957aef/pytest-restrict-3.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1e21a105ac306f4bb3f13472790a2f44", "sha256": "37fe4e4c6568c3997c60881e35bbeb36aeffce080899d686e4de7f27fd0dbc96" }, "downloads": -1, "filename": "pytest_restrict-3.0.0-py3-none-any.whl", "has_sig": true, "md5_digest": "1e21a105ac306f4bb3f13472790a2f44", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 4427, "upload_time": "2019-02-28T06:02:57", "url": "https://files.pythonhosted.org/packages/7a/15/b9e5cb5c8428452984453c57972ef3bd2e08654dcf5990197b8e69b6aef2/pytest_restrict-3.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a6615dbf1498b239954f4d31b17719e9", "sha256": "f3aade0b3aa67fe9fb5aa4f43006c741d34b5af2f6b2af43a7782d42280f94bd" }, "downloads": -1, "filename": "pytest-restrict-3.0.0.tar.gz", "has_sig": true, "md5_digest": "a6615dbf1498b239954f4d31b17719e9", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 5109, "upload_time": "2019-02-28T06:02:59", "url": "https://files.pythonhosted.org/packages/54/f7/1421298b12fea5aa0bbadd4efacc0c7cb8cdb09a28e69cd8e1943e957aef/pytest-restrict-3.0.0.tar.gz" } ] }