{ "info": { "author": "Gary Bernhardt", "author_email": "gary.bernhardt@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "Topic :: Software Development :: Testing" ], "description": "BASICS\n ======\n \n Expecter Gadget helps you to write assertions. Never again will you forget\n which is expected and which is actual!\n \n Basic expectations are easy:\n \n >>> from expecter import expect\n >>> expect('some' + 'thing') == 'something'\n expect('something')\n >>> expect(1) > 100\n Traceback (most recent call last):\n ...\n AssertionError: Expected something greater than 100 but got 1\n \n Just read the expectations like a sentence. \"expect(2) == 1 + 1\" reads as\n \"Expect 2 to equal 1 + 1\". Obviously, the expectation is about 2, and it's\n being compared to 1 + 1. No ambiguity!\n \n EXCEPTIONS\n ==========\n \n Expectations about exceptions use the \"with\" statement. Everything is good if\n the expected exception is raised:\n \n >>> from __future__ import with_statement\n >>> with expect.raises(KeyError):\n ... {}[123]\n \n If it's not raised, Expecter Gadget will raise an AssertionError:\n \n >>> with expect.raises(KeyError):\n ... pass\n Traceback (most recent call last):\n ...\n AssertionError: Expected an exception of type KeyError but got none\n \n Exceptions that don't match the expected one will not be swallowed, so your\n test will error as you expect:\n \n >>> from __future__ import with_statement\n >>> with expect.raises(NameError):\n ... {}[123]\n Traceback (most recent call last):\n ...\n KeyError: 123\n \n CUSTOM EXPECTATIONS\n ===================\n \n You can add a custom expectation with the add\\_expectation method. You give it\n a predicate that should return true if the expectation succeeds and false if\n it fails. All expectation objects will grow a method with the name of your\n predicate method (so don't use a lambda). Appropriate exception messages will\n be generated when your predicate fails:\n \n >>> import expecter\n >>> def can_meow(thing):\n ... return thing == 'kitty'\n >>> expecter.add_expectation(can_meow)\n >>> expect('kitty').can_meow()\n >>> expect('puppy').can_meow()\n Traceback (most recent call last):\n ...\n AssertionError: Expected that 'puppy' can_meow, but it can't\n \n API DOCUMENTATION\n =================\n \n See http://expecter-gadget.readthedocs.org/en/latest/", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/garybernhardt/expecter", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "expecter", "package_url": "https://pypi.org/project/expecter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/expecter/", "project_urls": { "Homepage": "https://github.com/garybernhardt/expecter" }, "release_url": "https://pypi.org/project/expecter/0.3.0/", "requires_dist": null, "requires_python": null, "summary": "Expecter Gadget, a better expectation (assertion) library", "version": "0.3.0" }, "last_serial": 1137259, "releases": { "0.1": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "32c24a87ee1a522db2ca60525bd6ff00", "sha256": "9b466fdd4e6aba2490f5c65e8aef4e4590848e47934d39dc14a85826e6747e8c" }, "downloads": -1, "filename": "expecter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "32c24a87ee1a522db2ca60525bd6ff00", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 1883, "upload_time": "2010-03-07T03:43:54", "url": "https://files.pythonhosted.org/packages/dd/79/1b0f40675933e81c97712df71b887c427d7d019f663bf4081708c4f78750/expecter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a75f264f53dcce541b9d0c694bd18bea", "sha256": "115009dc1ad0fc69dcbe91dab56b4c9b3b144a04da34c0dc5bcd6e786f67117c" }, "downloads": -1, "filename": "expecter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "a75f264f53dcce541b9d0c694bd18bea", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2189, "upload_time": "2010-03-11T01:48:32", "url": "https://files.pythonhosted.org/packages/2b/4f/e72a23e66949c689886a174ef0f644a1de994d3b7ca11488b45d4d25e2b5/expecter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "60eb5c31433eef3082d214e7263a2b38", "sha256": "d8f616339a0d27745ad1f00e6adbe37d66380dcb786b2f9b554ec9b164110abf" }, "downloads": -1, "filename": "expecter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "60eb5c31433eef3082d214e7263a2b38", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2181, "upload_time": "2010-03-15T20:59:00", "url": "https://files.pythonhosted.org/packages/25/58/252cd1092c2e6991a8624fd24f2377dc23b52c66b1030ea4f307f4ad1c50/expecter-0.1.3.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "5b41a1b9e500b5608e7e55511b5a31fc", "sha256": "c5ccb8a66cc35eb8920f0d7ae3a9ff18d0e8d592825e01d5d36885152b79771d" }, "downloads": -1, "filename": "expecter-0.2.tar.gz", "has_sig": false, "md5_digest": "5b41a1b9e500b5608e7e55511b5a31fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2860, "upload_time": "2010-12-04T22:09:33", "url": "https://files.pythonhosted.org/packages/e6/35/6b7cfd5b1b434977678d6c1dc0e3072bd3b51daac88415ecb650cb29c820/expecter-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "59626ff58b4cb66f973b6f7b201002c5", "sha256": "c3becf37b5efff3a575c3008eb8e0bcc2c7425957777d6bf0eb15cb6972e5a5c" }, "downloads": -1, "filename": "expecter-0.2.1.tar.gz", "has_sig": false, "md5_digest": "59626ff58b4cb66f973b6f7b201002c5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2853, "upload_time": "2010-12-17T00:15:24", "url": "https://files.pythonhosted.org/packages/0b/29/300120ba0a6200ad12f3c52bee630e1bf1f99a53aceba50fd5e3522cae0f/expecter-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "31b0c4305b7d0cc7400c4c3498af1150", "sha256": "5956cd7607841a1ec3807503f1d74b68ac2619abb44e3c2a46466800cca1a1b1" }, "downloads": -1, "filename": "expecter-0.2.2.tar.gz", "has_sig": false, "md5_digest": "31b0c4305b7d0cc7400c4c3498af1150", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2945, "upload_time": "2012-07-14T01:32:00", "url": "https://files.pythonhosted.org/packages/1d/c4/1ef9438591b406108ca64ac66ca7693ccb1cf92639789b2ece940204ef7f/expecter-0.2.2.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "cda4395e484d098b2653069125553b24", "sha256": "4d2cab9d9c80620456231106b989c9a6c70f8f7f3a9725a6644097bd3017705a" }, "downloads": -1, "filename": "expecter-0.3.0.tar.gz", "has_sig": false, "md5_digest": "cda4395e484d098b2653069125553b24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3975, "upload_time": "2014-06-25T18:35:32", "url": "https://files.pythonhosted.org/packages/38/e4/e95bd114353f6736acaeaa397e7b0662b948624a43b53aaa706919921bb5/expecter-0.3.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cda4395e484d098b2653069125553b24", "sha256": "4d2cab9d9c80620456231106b989c9a6c70f8f7f3a9725a6644097bd3017705a" }, "downloads": -1, "filename": "expecter-0.3.0.tar.gz", "has_sig": false, "md5_digest": "cda4395e484d098b2653069125553b24", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3975, "upload_time": "2014-06-25T18:35:32", "url": "https://files.pythonhosted.org/packages/38/e4/e95bd114353f6736acaeaa397e7b0662b948624a43b53aaa706919921bb5/expecter-0.3.0.tar.gz" } ] }