{ "info": { "author": "Austin Noto-Moniz", "author_email": "pyinq.test@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Environment :: Console", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.7", "Topic :: Software Development :: Testing" ], "description": "=====\r\nPyInq\r\n=====\r\n\r\n*Find the Spanish translation of this page here:* http://www.webhostinghub.com/support/es/misc/estructura-de-pruebas-pyinq\r\n\r\nPyInq is a Python unit testing framework created in the tradition of the xUnit family. Specifically, it draws its influence from JUnit and PyUnit (unittest).\r\n\r\nThe bulk of PyInq's functionality was influenced by PyUnit. However, Java coders will recogize the use of decorators for test identification from JUnit 4. Selenium users will recogize PyInq's suite of \"eval\" functions; they were influenced by Selenium's \"verify\" functions.\r\n\r\nDifferences From PyUnit (unittest)\r\n----------------------------------\r\n* Test identification by decorators\r\n* Module level tests\r\n* Suite support\r\n\t* Simplified creation and execution\r\n\t* No calling or invoking a test runner\r\n\t* Create suites with a single keyword argument, not a separate object\r\n* Eval functions (passive asserts)\r\n* Detailed, color coded output\r\n\t* For each test, prints the result of each assert and eval statement\r\n\t* Color coded based on result\r\n* Pythonic naming\r\n\r\nOther Notable Features\r\n----------------------\r\n* Test fixtures\r\n\t* At test, class, module, and suite level\r\n* Expected exceptions\r\n* Conditional skips\r\n* Output to command line (CLI) or an HTML file\r\n\t* CLI defaults to color output in Windows console and Linux bash\r\n\t* CLI defaults to black and white in any other system\r\n* Command line test module/suite execution\r\n\r\nDocumentation\r\n-------------\r\nFormal documentation is finally complete! It is both included in the package itself, and present on PyPI at `http://pythonhosted.org/PyInq/ `_. From now on, I'll be keeping this up to date as needed.\r\n\r\nLet me know your thoughts! If you find any issues with it, feel free to email me, and I'll fix it asap.\r\n\r\nAdditionally, below I've included some examples of how to use PyInq.\r\n\r\n##############\r\nBasic Examples\r\n##############\r\nSimply run the code as is to try any of these examples for youself\r\n\r\nA single module level test::\r\n\r\n\tfrom pyinq.asserts import *\r\n\tfrom pyinq.tags import *\r\n\t\r\n\t@test\r\n\tdef atest():\r\n\t\tassert_true(True)\r\n\r\nTest expecting an error::\r\n\t\r\n\tfrom pyinq.asserts import *\r\n\tfrom pyinq.tags import *\r\n\t\r\n\t@test(expected=ValueError)\r\n\tdef tester():\r\n\t\tassert_equal(int(\"4.0\"),4)\r\n\r\nUsing an instance variable::\r\n\r\n\tfrom pyinq.asserts import *\r\n\tfrom pyinq.tags import *\r\n\t\r\n\t@testClass\r\n\tclass Class1:\r\n\t\t@before\r\n\t\tdef setup():\r\n\t\t\tthis.num = 4\r\n\r\n\t\t@test\r\n\t\tdef test():\r\n\t\t\tassert_equal(this.num,4)\r\n\t\t\tthis.num += 1\r\n\t\t\r\n\t\t@after\r\n\t\tdef teardown():\r\n\t\t\tassert_equal(this.num,5)\r\n\r\nunittest basic example::\r\n\r\n\tfrom pyinq.asserts import *\r\n\tfrom pyinq.tags import *\r\n\timport random\r\n\r\n\t@testClass\r\n\tclass TestSequenceFunctions:\r\n\t\t@before\r\n\t\tdef setUp():\r\n\t\t\tthis.seq = range(10)\r\n\r\n\t\t@test\r\n\t\tdef test_shuffle():\r\n\t\t\t# make sure the shuffled TestSequenceFunctions.sequence does not lose any elements\r\n\t\t\trandom.shuffle(this.seq)\r\n\t\t\tthis.seq.sort()\r\n\t\t\tassert_equal(this.seq, range(10))\r\n\r\n\t\t\t# should raise an exception for an immutable TestSequenceFunctions.sequence\r\n\t\t\tassert_raises(TypeError, random.shuffle, (1,2,3))\r\n\r\n\t\t@test\r\n\t\tdef test_choice():\r\n\t\t\telement = random.choice(this.seq)\r\n\t\t\tassert_true(element in this.seq)\r\n\r\n\t\t@test\r\n\t\tdef test_sample():\r\n\t\t\tassert_raises(ValueError, random.sample, this.seq, 20)\r\n\t\t\tfor element in random.sample(this.seq, 5):\r\n\t\t\t\tassert_in(element,this.seq)\r\n\r\n##############\r\nTest Discovery\r\n##############\r\nTest discovery is a method for finding tests beginning at a specific root folder. The program will walk down each Python package in the folder structure until it has nowhere else to go. If any files in the package contain PyInq tests, they will be properly detected and executed.\r\n\r\nThe main way to use it is invocation from the command line, like so::\r\n\r\n\tpython -m pyinq discovery \r\n\r\nOutput is the same as when executing a single file, with the addition of a tag indicating which module a set of tests belongs to.\r\n\r\nYou may also choose to invoke test discovery via the API. If you do, you will be given a TestSuite object, which is executable. A sample of how to use it appears below::\r\n\r\n\tfrom pyinq import discover_tests\r\n\t\r\n\tsuite = discover_tests('examples')\r\n\tif suite:\r\n\t\tsuite()\r\n\r\n\r\nContact Me\r\n----------\r\nIf you have any questions or comments, find any bugs, or wish to make any feature requests, shoot me an email at pyinq.test@gmail.com. I am especially hoping to receive bug reports, for although I am unaware of any bugs, fresh sets of eyes have a better chance of finding what I missed.\r\n\r\nAlso, I will be setting up a separate web page and public GitHub repo for this project very soon. I will post those links here once they are ready.\r\n\r\nChange Log\r\n----------\r\nv0.2.1, November 15, 2013\r\n\t- Wrote formal documentation\r\n\t- Cleaned up a bunch of naming and heriarchical decisions\r\n\t- Refactored some ugly pieces of backend code\r\n\r\nv0.2.0, March 3, 2013\r\n - Test discovery (command line and API)\r\n - Made test discovery a subcommand, with its own special command line arguments\r\n - Test execution through Python interpreter (\"python -m pyinq\")\r\n - Implicit class instance now \"self\" (was \"this\")\r\n - @test's expected error argument now \"expect\" (was \"expected\")\r\n - Empty classes no longer listed in test report\r\n\r\n - Disable auto-execution in code\r\n - Refactored test fixture and test data classes\r\n - Treating test object as a string yields test structure within that object\r\n - Rebuilt suite collection\r\n - Rebuilt test registration\r\n\r\nv0.1.1, July 26, 2012 --\r\n - Renamed each tag to begin with a lower case letter.\r\n - Fixed a bug in the eval example.\r\n\r\nv0.1.0, July 23, 2012 -- Initial release.", "description_content_type": null, "docs_url": "https://pythonhosted.org/PyInq/", "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://auzzy.github.io/pyinq/", "keywords": "", "license": "ISCL", "maintainer": "", "maintainer_email": "", "name": "PyInq", "package_url": "https://pypi.org/project/PyInq/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/PyInq/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://auzzy.github.io/pyinq/" }, "release_url": "https://pypi.org/project/PyInq/0.2.1/", "requires_dist": null, "requires_python": null, "summary": "Python unit test framework, an alternative to unittest.", "version": "0.2.1" }, "last_serial": 920127, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "214a79050364ffacd77e7b793ecc6bb1", "sha256": "1fa27a451cdb77d77e16fad81b23f763c3c0546c55822c3c6cc04520027e5448" }, "downloads": -1, "filename": "PyInq-0.1.0.tar.gz", "has_sig": false, "md5_digest": "214a79050364ffacd77e7b793ecc6bb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19370, "upload_time": "2012-07-24T03:05:58", "url": "https://files.pythonhosted.org/packages/6b/21/aeaf4091f083293ce5454d1e1fd0dd3a5fe286495496c3d687370411498b/PyInq-0.1.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "5d44c480a42911e7039a69a06ee07fc3", "sha256": "4565acde22d3534dae3cdbd32aab41ce067a60fc59c5d1ec25c4d5f7aedcd077" }, "downloads": -1, "filename": "PyInq-0.1.0.zip", "has_sig": false, "md5_digest": "5d44c480a42911e7039a69a06ee07fc3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41096, "upload_time": "2012-07-24T03:04:40", "url": "https://files.pythonhosted.org/packages/35/7a/f8aa27b1ffe3ca9f64f69f255b0ace07497b59eaeb4691a3b9a7fb93e443/PyInq-0.1.0.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "273b4b9fdf6f8cfb4dca97ba8f9bf469", "sha256": "21307ff86efb51a3cca8a8723f9ad40c7243f7cf84e9307635a61582d25b2f19" }, "downloads": -1, "filename": "PyInq-0.1.1.tar.gz", "has_sig": false, "md5_digest": "273b4b9fdf6f8cfb4dca97ba8f9bf469", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19807, "upload_time": "2012-07-26T07:41:17", "url": "https://files.pythonhosted.org/packages/26/d8/9b21376d0af2e489e3c19f0283f551d56e2448ae2c439d826dcb34cdc330/PyInq-0.1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "d36250a384b2aa64e7e8fc7a12884d14", "sha256": "cf8c25895fa52fed91679ca7ccc8a62aeaac43bc7a948b28b66465b6dcbb5ea9" }, "downloads": -1, "filename": "PyInq-0.1.1.zip", "has_sig": false, "md5_digest": "d36250a384b2aa64e7e8fc7a12884d14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30034, "upload_time": "2012-07-26T07:08:34", "url": "https://files.pythonhosted.org/packages/91/f7/4088b6b75763574ade7bf72d3551a61362a5998d4c0df9147ebead3970b2/PyInq-0.1.1.zip" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "34ba4b569843611fb7722358fe1ea1b2", "sha256": "0427e825e6ff1dca40a19f8013a8a728f2ad8abc2fed58c1a259ef64cc71c5f7" }, "downloads": -1, "filename": "PyInq-0.2.0.tar.gz", "has_sig": false, "md5_digest": "34ba4b569843611fb7722358fe1ea1b2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25373, "upload_time": "2013-06-27T04:21:51", "url": "https://files.pythonhosted.org/packages/5a/48/8bc9fb4421fc351e1819b0c553492abe87ad8d67dd039eed456f9e54ca82/PyInq-0.2.0.tar.gz" }, { "comment_text": "", "digests": { "md5": "67ca2650447d4341ded5240cde332b7d", "sha256": "57aeeda7ba9937cc2dd7729c98b4204197aec50c961caa68e67d7bccac0229b3" }, "downloads": -1, "filename": "PyInq-0.2.0.zip", "has_sig": false, "md5_digest": "67ca2650447d4341ded5240cde332b7d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 52443, "upload_time": "2013-06-27T04:22:02", "url": "https://files.pythonhosted.org/packages/55/5b/42d2ffbd3c5aa34206a696fbeeb365707888613eaf76f7bec75f60778a6c/PyInq-0.2.0.zip" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "0db41e11f43abcf6baa698946c07ad9e", "sha256": "a0ace8d39df8e7fdf158d33242adaa890c5a1f00f1f2c696c9c0e5a0d759800a" }, "downloads": -1, "filename": "PyInq-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0db41e11f43abcf6baa698946c07ad9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 145276, "upload_time": "2013-11-15T05:15:17", "url": "https://files.pythonhosted.org/packages/54/d8/6d9b08d7e64b631d5667b5e40a0b12838c348c8b2e185fa8cf5a5396cedd/PyInq-0.2.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "22097b75d1fb4a8d9d9f8870bd36b9ab", "sha256": "5d0691e4fb67446f18fb16f2abce7f518dac7e8a0fd0b3efc5ad1c852d537b2a" }, "downloads": -1, "filename": "PyInq-0.2.1.zip", "has_sig": false, "md5_digest": "22097b75d1fb4a8d9d9f8870bd36b9ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 214730, "upload_time": "2013-11-15T05:15:14", "url": "https://files.pythonhosted.org/packages/fc/39/d361ca60407d47853701f9d7bb9f8887311c0f697e2327d6e6e5451fb435/PyInq-0.2.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0db41e11f43abcf6baa698946c07ad9e", "sha256": "a0ace8d39df8e7fdf158d33242adaa890c5a1f00f1f2c696c9c0e5a0d759800a" }, "downloads": -1, "filename": "PyInq-0.2.1.tar.gz", "has_sig": false, "md5_digest": "0db41e11f43abcf6baa698946c07ad9e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 145276, "upload_time": "2013-11-15T05:15:17", "url": "https://files.pythonhosted.org/packages/54/d8/6d9b08d7e64b631d5667b5e40a0b12838c348c8b2e185fa8cf5a5396cedd/PyInq-0.2.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "22097b75d1fb4a8d9d9f8870bd36b9ab", "sha256": "5d0691e4fb67446f18fb16f2abce7f518dac7e8a0fd0b3efc5ad1c852d537b2a" }, "downloads": -1, "filename": "PyInq-0.2.1.zip", "has_sig": false, "md5_digest": "22097b75d1fb4a8d9d9f8870bd36b9ab", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 214730, "upload_time": "2013-11-15T05:15:14", "url": "https://files.pythonhosted.org/packages/fc/39/d361ca60407d47853701f9d7bb9f8887311c0f697e2327d6e6e5451fb435/PyInq-0.2.1.zip" } ] }