{ "info": { "author": "herr kaste", "author_email": "herr.kaste@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: MacOS :: MacOS X", "Operating System :: Microsoft :: Windows", "Operating System :: POSIX", "Programming Language :: Python", "Topic :: Software Development :: Quality Assurance", "Topic :: Software Development :: Testing", "Topic :: Utilities" ], "description": "Convenience plugin on top of mockito.\n\n.. image:: https://travis-ci.org/kaste/pytest-mockito.svg?branch=master\n :target: https://travis-ci.org/kaste/pytest-mockito\n\nInstall\n=======\n\n``pip install pytest-mockito``\n\nAfter that the plugin is enabled by default.\n\n\nFixtures\n========\n\nThe plugin provides fixtures for the main entrypoints of mockito which guarantee that you `unstub()` on teardown. Usage is *very* simple and straightforward::\n\n def test_foo(when):\n when(os.path).exists('/foo').thenReturn(False)\n assert os.path.exists('/foo') # sic!\n # will still unstub/unpatch bc pytest will run the teardown\n\nFor convenience `verifyStubbedInvocationsAreUsed` is called just before `unstub`. This should warn you when you setup stubs that you actually don't use.\n\nYou can also use a marker. `usefixtures `_ here will ensure an `unstub` at the end of each test, but does not actually inject the fixture::\n\n import pytest\n\n @pytest.mark.usefixtures('unstub')\n class TestDog:\n def test(self):\n ...\n\nTo mark *all* test cases at the module level::\n\n pytestmark = pytest.mark.usefixtures('unstub')\n\n\nAll of the following fixtures just export the equivalent mockito function but `unstub()` on teardown. The exception here is `expect` which also calls `verifyNoUnwantedInteractions()`::\n\n when\n when2\n expect\n patch\n unstub\n spy2", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/kaste/pytest-mockito", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pytest-mockito", "package_url": "https://pypi.org/project/pytest-mockito/", "platform": "linux", "project_url": "https://pypi.org/project/pytest-mockito/", "project_urls": { "Homepage": "https://github.com/kaste/pytest-mockito" }, "release_url": "https://pypi.org/project/pytest-mockito/0.0.4/", "requires_dist": null, "requires_python": "", "summary": "Base fixtures for mockito", "version": "0.0.4" }, "last_serial": 4051685, "releases": { "0.0.1": [], "0.0.2": [ { "comment_text": "", "digests": { "md5": "c46198bce0142c939e7e84dfdb1c95fb", "sha256": "19c5299acfabea9527b10eed6892486279ed630cc5516b7ba9234d5f213487b2" }, "downloads": -1, "filename": "pytest-mockito-0.0.2.tar.gz", "has_sig": false, "md5_digest": "c46198bce0142c939e7e84dfdb1c95fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2832, "upload_time": "2017-01-25T17:02:25", "url": "https://files.pythonhosted.org/packages/e9/8b/feddfa2f31f7d4c951323f66b2c1d00c79f91285f03b56ed52eae0ace7c6/pytest-mockito-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "ce9937cb5528bc9d1e0d711cd6beaf6b", "sha256": "73933dd6abd567c8f538e9ddb3b8d7e8139d05cc5cb633e8c95bdb0192794f4c" }, "downloads": -1, "filename": "pytest-mockito-0.0.3.tar.gz", "has_sig": false, "md5_digest": "ce9937cb5528bc9d1e0d711cd6beaf6b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3031, "upload_time": "2017-02-02T12:46:32", "url": "https://files.pythonhosted.org/packages/90/9d/76e31a7cd2fdf146dd8d1ba99badd4c17c466adf96b67769138fc84b933b/pytest-mockito-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "00b3cfcce8ee36dce15e8bf9895e9e02", "sha256": "40d40cdf118127dcb1e3c9e838b0d1c11d5197a23beaf10b6e3f42f9b6cb68a9" }, "downloads": -1, "filename": "pytest-mockito-0.0.4.tar.gz", "has_sig": false, "md5_digest": "00b3cfcce8ee36dce15e8bf9895e9e02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3037, "upload_time": "2018-07-11T17:18:25", "url": "https://files.pythonhosted.org/packages/a4/f8/ae0035931c603e4ed5db496c13b12a995f327ee1d86d1b705eb3b6b9365b/pytest-mockito-0.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "00b3cfcce8ee36dce15e8bf9895e9e02", "sha256": "40d40cdf118127dcb1e3c9e838b0d1c11d5197a23beaf10b6e3f42f9b6cb68a9" }, "downloads": -1, "filename": "pytest-mockito-0.0.4.tar.gz", "has_sig": false, "md5_digest": "00b3cfcce8ee36dce15e8bf9895e9e02", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3037, "upload_time": "2018-07-11T17:18:25", "url": "https://files.pythonhosted.org/packages/a4/f8/ae0035931c603e4ed5db496c13b12a995f327ee1d86d1b705eb3b6b9365b/pytest-mockito-0.0.4.tar.gz" } ] }