{ "info": { "author": "Renato Alves", "author_email": "alves.rjc@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Interface Engine/Protocol Translator", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Software Development :: Testing" ], "description": "SimpleTAP\r\n=========\r\n\r\n``simpletap`` is a test runner that integrates with the unittest framework to\r\nproduce TAP (Test Anything Protocol) compatible output.\r\n\r\n| ``simpletap`` has been extensively tested under Python 2.7 and is considered production ready.\r\n| Python 3.4-3.5 is also supported but has not seen as much testing.\r\n\r\n\r\nUsage\r\n-----\r\n\r\nIn your test scripts, instead of:\r\n\r\n.. code:: python\r\n\r\n if __name__ == \"__main__\":\r\n unittest.main()\r\n\r\nuse:\r\n\r\n.. code:: python\r\n\r\n if __name__ == \"__main__\":\r\n from simpletap import TAPTestRunner\r\n unittest.main(testRunner=TAPTestRunner())\r\n\r\n\r\nA small test case like:\r\n\r\n.. code:: python\r\n\r\n import unittest\r\n\r\n class IntegerArithmeticTestCase(unittest.TestCase):\r\n def testAdd(self): # test method names begin 'test*'\r\n \"test adding values\"\r\n self.assertEqual((1 + 2), 3)\r\n self.assertEqual(0 + 1, 1)\r\n\r\n def testMultiply(self):\r\n \"test multiplying values\"\r\n self.assertEqual((0 * 10), 0)\r\n self.assertEqual((5 * 8), 40)\r\n\r\n def testFail(self):\r\n \"a failing test\"\r\n self.assertEqual(0, 1)\r\n\r\n @unittest.expectedFailure\r\n def testExpectFail(self):\r\n \"we saw this coming\"\r\n self.assertEqual(0, 1)\r\n\r\n @unittest.skipIf(True, \"Skipping this one\")\r\n def testSkip(self):\r\n \"pending a fix\"\r\n self.assertEqual(0, 1)\r\n\r\n def testError(self):\r\n \"oops something went wrong\"\r\n no_such_variable + 1 # Oops!\r\n\r\n if __name__ == \"__main__\":\r\n from simpletap import TAPTestRunner\r\n unittest.main(testRunner=TAPTestRunner())\r\n\r\nWhen saved in a file called ``test.py`` and executed would produce:\r\n\r\n.. code:: TAP\r\n\r\n 1..6\r\n ok 1 - test.py: test adding values\r\n not ok 2 - test.py: oops something went wrong\r\n # ERROR: NameError on file test.py line 30 in testError: 'no_such_variable + 1 # Oops!':\r\n # global name 'no_such_variable' is not defined\r\n skip 3 - test.py: we saw this coming\r\n # EXPECTED_FAILURE: AssertionError on file test.py line 21 in testExpectFail: 'self.assertEqual(0, 1)':\r\n # 0 != 1\r\n not ok 4 - test.py: a failing test\r\n # FAIL: AssertionError on file test.py line 16 in testFail: 'self.assertEqual(0, 1)':\r\n # 0 != 1\r\n ok 5 - test.py: test multiplying values\r\n skip 6 - test.py: pending a fix\r\n # SKIP:\r\n # Skipping this one\r\n\r\n\r\nYou can also launch ``simpletap`` directly from the command line in much the same way you do with unittest:\r\n\r\n.. code::\r\n\r\n python -m simpletap test.IntegerArithmeticTestCase\r\n\r\nDeviations from standard\r\n------------------------\r\n\r\nThe specification of Test Anything Protocol treats skipped tests as ``ok``.\r\n\r\nDuring the use of this module it was found to be more useful to treat these, as\r\nwell as expected failures as extensions to the specification under the keyword ``skip``.\r\n\r\n\r\nTesting\r\n-------\r\n\r\nThe test suite is configured to run via `tox `__.\r\n\r\nStatus:\r\n\r\n.. image:: https://travis-ci.org/Unode/simpletap.svg?branch=master\r\n :target: https://travis-ci.org/Unode/simpletap", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Unode/simpletap", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "simpletap", "package_url": "https://pypi.org/project/simpletap/", "platform": "any", "project_url": "https://pypi.org/project/simpletap/", "project_urls": { "Homepage": "https://github.com/Unode/simpletap" }, "release_url": "https://pypi.org/project/simpletap/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Unittest runner producing Test Anything Protocol (TAP) output", "version": "1.0.1" }, "last_serial": 2117354, "releases": { "1.0.1": [ { "comment_text": "", "digests": { "md5": "ab913a7ed26a0879235656912f3129bc", "sha256": "dc029d10372d270eb26410698495cefa32460090c47b7f984342c84941fed1e7" }, "downloads": -1, "filename": "simpletap-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "ab913a7ed26a0879235656912f3129bc", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 13994, "upload_time": "2016-05-16T02:23:40", "url": "https://files.pythonhosted.org/packages/24/7c/24fa38ab4ffadd86bee3aa3f00574337d95d2d6ecc6ca6bdf45e1aef87e3/simpletap-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74dae38acdf234172353f8cf056635c1", "sha256": "2eb8e32c0d5e178963f531977f116ef0df51bfa45795a64b4be39ac8d247ec55" }, "downloads": -1, "filename": "simpletap-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "74dae38acdf234172353f8cf056635c1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13997, "upload_time": "2016-05-16T02:23:45", "url": "https://files.pythonhosted.org/packages/96/47/897c92791698536b52cd43af7264ceb3ebb9093657623445842757cdef51/simpletap-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7bddca2645e5b94b9ce173723c33cba9", "sha256": "5d48c407119df29b824f404de8c45881e73ee99b4eb57a993fb5725872a3acbc" }, "downloads": -1, "filename": "simpletap-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7bddca2645e5b94b9ce173723c33cba9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15573, "upload_time": "2016-05-16T02:23:50", "url": "https://files.pythonhosted.org/packages/c7/35/eda4156198c65c46e162fb8e87f5ca670535419753447cc9abcad6d7ce50/simpletap-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ab913a7ed26a0879235656912f3129bc", "sha256": "dc029d10372d270eb26410698495cefa32460090c47b7f984342c84941fed1e7" }, "downloads": -1, "filename": "simpletap-1.0.1-py2-none-any.whl", "has_sig": false, "md5_digest": "ab913a7ed26a0879235656912f3129bc", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 13994, "upload_time": "2016-05-16T02:23:40", "url": "https://files.pythonhosted.org/packages/24/7c/24fa38ab4ffadd86bee3aa3f00574337d95d2d6ecc6ca6bdf45e1aef87e3/simpletap-1.0.1-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "74dae38acdf234172353f8cf056635c1", "sha256": "2eb8e32c0d5e178963f531977f116ef0df51bfa45795a64b4be39ac8d247ec55" }, "downloads": -1, "filename": "simpletap-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "74dae38acdf234172353f8cf056635c1", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 13997, "upload_time": "2016-05-16T02:23:45", "url": "https://files.pythonhosted.org/packages/96/47/897c92791698536b52cd43af7264ceb3ebb9093657623445842757cdef51/simpletap-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7bddca2645e5b94b9ce173723c33cba9", "sha256": "5d48c407119df29b824f404de8c45881e73ee99b4eb57a993fb5725872a3acbc" }, "downloads": -1, "filename": "simpletap-1.0.1.tar.gz", "has_sig": false, "md5_digest": "7bddca2645e5b94b9ce173723c33cba9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15573, "upload_time": "2016-05-16T02:23:50", "url": "https://files.pythonhosted.org/packages/c7/35/eda4156198c65c46e162fb8e87f5ca670535419753447cc9abcad6d7ce50/simpletap-1.0.1.tar.gz" } ] }