{ "info": { "author": "Chris Wesseling", "author_email": "chris.wesseling@cwi.nl", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Testing" ], "description": "A custom Should-DSL matcher to use with Dingus\n===============================================\n\nThis modules contains a custom matcher so you can use should_dsl_ with Dingus_ calls\n\nA small warning: The | operator hack of should_dsl's doesn't really go well with the __or__() of a Dingus.\nI think the | hack is nasty, and I'm not sure I like should_dsl_ for it. This is where Ruby seems really pretty to me.\n\n.. _should_dsl: http://www.should-dsl.info/\n.. _Dingus: http://pypi.python.org/pypi/dingus\n\n\n\nYou only need to import it ::\n\n >>> from should_dsl import should, should_not\n >>> from dingus import Dingus\n >>> import should_dingus\n\n\n------------\n\n\n**call**\n\nChecks calls on a Dingus ::\n\n >>> stub = Dingus('stub')\n >>> def some_function():\n ... stub()\n ...\n >>> some_function |should| call(stub)\n\n*call* can also check that it should be called *once*::\n\n >>> def some_function():\n ... stub()\n ... stub()\n ...\n >>> stub.reset()\n >>> some_function |should| call(stub)\n >>> stub.reset()\n >>> some_function |should| call(stub).once\n Traceback (most recent call last):\n ...\n ShouldNotSatisfied: was called 2 times, expected 1\n\n*call* can even check the parameters with *with_params*::\n\n >>> def some_function():\n ... stub(True, kwak='tuut', braat='aap')\n ...\n >>> stub.reset()\n >>> some_function |should| call(stub).with_params(True, kwak='tuut', braat='aap')\n >>> stub.reset()\n >>> some_function |should| call(stub).with_params(True, kwak='tuut')\n Traceback (most recent call last):\n ...\n ShouldNotSatisfied: has not been called with params (True,) {'kwak': 'tuut'}\n\n*call* *with_params* can be combined with *once*::\n\n >>> def some_function():\n ... stub(True, kwak='tuut', braat='aap')\n ...\n >>> stub.reset()\n >>> some_function |should| call(stub).once.with_params(True, kwak='tuut', braat='aap')\n >>> stub.reset()\n >>> some_function |should| call(stub).with_params(True, kwak='tuut', braat='aap').once", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/CharString/should-dingus", "keywords": "dingus should dsl testing test mocking mock double stub fake record assert bdd python expectation", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "should-dingus", "package_url": "https://pypi.org/project/should-dingus/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/should-dingus/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/CharString/should-dingus" }, "release_url": "https://pypi.org/project/should-dingus/0.3/", "requires_dist": null, "requires_python": null, "summary": "Dingus call matcher for should-dsl", "version": "0.3" }, "last_serial": 799509, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "bc660dae00394b804e2b09d63475e7c5", "sha256": "8846a7eb9b337272aba3a4537e060b037668ae3cb6e4c6d78e74383f2cf5ff99" }, "downloads": -1, "filename": "should-dingus-0.1.tar.gz", "has_sig": true, "md5_digest": "bc660dae00394b804e2b09d63475e7c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2173, "upload_time": "2011-08-16T21:33:17", "url": "https://files.pythonhosted.org/packages/b1/22/418feea6a732b5b44813d3ebcb96e81160d947382158652ffa4a57abffe3/should-dingus-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "dc3d7d80f4f6e82e62afc957dcf82bfd", "sha256": "cc7aac7aa4fd63bd138426484b02f55a3b0d49a70583cd9721f518ca4a3de68b" }, "downloads": -1, "filename": "should-dingus-0.2.tar.gz", "has_sig": true, "md5_digest": "dc3d7d80f4f6e82e62afc957dcf82bfd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2189, "upload_time": "2011-08-17T16:31:41", "url": "https://files.pythonhosted.org/packages/9b/59/119e9e194103f36ff1cc57dc81d235fe2d522dca510210f267368c583188/should-dingus-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "ec802d998fcc726b532c40644ea5f044", "sha256": "35b9ad7e059793b224f0496ba1d5aa374618dd43bc243438971a00277ea63255" }, "downloads": -1, "filename": "should-dingus-0.3.tar.gz", "has_sig": true, "md5_digest": "ec802d998fcc726b532c40644ea5f044", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4379, "upload_time": "2011-08-19T18:48:10", "url": "https://files.pythonhosted.org/packages/5c/03/b239beab0a360ba27365dd6f171de9f0a5aaac5c413b6b83efea33303f27/should-dingus-0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ec802d998fcc726b532c40644ea5f044", "sha256": "35b9ad7e059793b224f0496ba1d5aa374618dd43bc243438971a00277ea63255" }, "downloads": -1, "filename": "should-dingus-0.3.tar.gz", "has_sig": true, "md5_digest": "ec802d998fcc726b532c40644ea5f044", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4379, "upload_time": "2011-08-19T18:48:10", "url": "https://files.pythonhosted.org/packages/5c/03/b239beab0a360ba27365dd6f171de9f0a5aaac5c413b6b83efea33303f27/should-dingus-0.3.tar.gz" } ] }