{ "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-super-check\n==================\n\n.. image:: https://img.shields.io/travis/adamchainz/pytest-super-check.svg\n :target: https://travis-ci.org/adamchainz/pytest-super-check\n\n.. image:: https://img.shields.io/pypi/v/pytest-super-check.svg\n :target: https://pypi.python.org/pypi/pytest-super-check\n\nPytest plugin to check your TestCase classes call super in setUp, tearDown,\netc.\n\nFeatures\n--------\n\nThis plugin checks all ``TestCase`` classes in your test suite to ensure that\ntheir ``setUp``, ``tearDown``, ``setUpClass``, ``tearDownClass``, and\n``setUpTestData`` (Django extension) methods all call ``super()``. You might\ncare about this when you have extensions to these methods in your project\nspecific base class that when skipped (by accidentally missing ``super()``),\ncause subtle bugs.\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 some ``TestCase`` classes didn't call\n``super()`` in e.g. ``setUp``, which caused the tests to fail, or incorrectly\npass, in rather subtle ways. This problem is exacerbated by Django's ``setUp``\netc. doing magic around not requiring ``super()`` to be called. Our solution\nwas to just ensure every ``TestCase`` always calls ``super()`` in those\nmethods. 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-super-check\n\nPython 3.4+ supported.\n\nPytest will automatically find and use the plugin. Test discovery will then\nblow up if any subclasses of ``unittest.TestCase`` are found that have\n``setUp`` etc. methods that don't call ``super()``.\n\nYou can disable the plugin by passing the options ``-p no:super_check`` to\n``pytest``.\n\nCaveats\n-------\n\nOn Python 2, you'll need to ensure any decorators you use on your ``setUp``\netc. methods set ``__wrapped__``, to allow decorator-unwrapping so the inner\nsource can be inspected. This is the default behaviour of ``functools.wraps``\non Python 3 so you'll be more forwards compatible anyway.\n\n\n\n\nHistory\n-------\n\nPending Release\n---------------\n\n.. Insert new release notes below this line\n\n2.0.0 (2019-02-28)\n------------------\n\n* Drop Python 2 support, only Python 3.4+ is supported now.\n\n1.0.0 (2016-04-22)\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-super-check", "keywords": "pytest,super,unittest,testcase", "license": "BSD", "maintainer": "", "maintainer_email": "", "name": "pytest-super-check", "package_url": "https://pypi.org/project/pytest-super-check/", "platform": "", "project_url": "https://pypi.org/project/pytest-super-check/", "project_urls": { "Homepage": "https://github.com/adamchainz/pytest-super-check" }, "release_url": "https://pypi.org/project/pytest-super-check/2.0.0/", "requires_dist": [ "pytest" ], "requires_python": ">=3.4", "summary": "Pytest plugin to check your TestCase classes call super in setUp, tearDown, etc.", "version": "2.0.0" }, "last_serial": 4877738, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "a0c79b10d8d14bd906e6b645d25e5788", "sha256": "67a0487a135cb2861fc695bf635246668eb31909f849e639076534ff2eb82efa" }, "downloads": -1, "filename": "pytest_super_check-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a0c79b10d8d14bd906e6b645d25e5788", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 5764, "upload_time": "2016-04-22T13:05:16", "url": "https://files.pythonhosted.org/packages/aa/7f/9a77fd37455e054346a08aebbc1936a8af9333573f2d6a4ed3e544cd7e76/pytest_super_check-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "d80c301a1326bb401243d70c8555eb5b", "sha256": "1abbe9183e43debad4a723c1a7404289d841a41036d2448e8f05aa0fb05739f3" }, "downloads": -1, "filename": "pytest-super-check-1.0.0.tar.gz", "has_sig": false, "md5_digest": "d80c301a1326bb401243d70c8555eb5b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5655, "upload_time": "2016-04-22T13:05:22", "url": "https://files.pythonhosted.org/packages/8e/ed/ae58aad2c515358a8838d337e590d9f996538df21ac9be5d99fe7b643089/pytest-super-check-1.0.0.tar.gz" } ], "2.0.0": [ { "comment_text": "", "digests": { "md5": "ed893e5c27cf5d3d854235f6be1f791b", "sha256": "f7f285d70cafd1299b70debcaf885caef4d3768aa6c5ee76e10b86ab2a6cf740" }, "downloads": -1, "filename": "pytest_super_check-2.0.0-py3-none-any.whl", "has_sig": true, "md5_digest": "ed893e5c27cf5d3d854235f6be1f791b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 4579, "upload_time": "2019-02-28T06:14:29", "url": "https://files.pythonhosted.org/packages/22/ec/66ed0b35464509ce66023143cf7a2788467d3774eba4644b8233249380ca/pytest_super_check-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c94116a12271c69b8c3c903233f84135", "sha256": "20c7eaadbebeb029cfac6a2194be527effe1f4e9282313f589ccea6a6cca9b56" }, "downloads": -1, "filename": "pytest-super-check-2.0.0.tar.gz", "has_sig": true, "md5_digest": "c94116a12271c69b8c3c903233f84135", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 5203, "upload_time": "2019-02-28T06:14:31", "url": "https://files.pythonhosted.org/packages/f3/66/860de77b7a83683bc1ffeb0f67fee903e7806c9009cde7e21be50a59d804/pytest-super-check-2.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ed893e5c27cf5d3d854235f6be1f791b", "sha256": "f7f285d70cafd1299b70debcaf885caef4d3768aa6c5ee76e10b86ab2a6cf740" }, "downloads": -1, "filename": "pytest_super_check-2.0.0-py3-none-any.whl", "has_sig": true, "md5_digest": "ed893e5c27cf5d3d854235f6be1f791b", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.4", "size": 4579, "upload_time": "2019-02-28T06:14:29", "url": "https://files.pythonhosted.org/packages/22/ec/66ed0b35464509ce66023143cf7a2788467d3774eba4644b8233249380ca/pytest_super_check-2.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c94116a12271c69b8c3c903233f84135", "sha256": "20c7eaadbebeb029cfac6a2194be527effe1f4e9282313f589ccea6a6cca9b56" }, "downloads": -1, "filename": "pytest-super-check-2.0.0.tar.gz", "has_sig": true, "md5_digest": "c94116a12271c69b8c3c903233f84135", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.4", "size": 5203, "upload_time": "2019-02-28T06:14:31", "url": "https://files.pythonhosted.org/packages/f3/66/860de77b7a83683bc1ffeb0f67fee903e7806c9009cde7e21be50a59d804/pytest-super-check-2.0.0.tar.gz" } ] }