{"id":19656911,"url":"https://github.com/unode/simpletap","last_synced_at":"2026-05-07T16:05:29.843Z","repository":{"id":57467689,"uuid":"58897322","full_name":"unode/simpletap","owner":"unode","description":"A unittest runner that produces Test Anything Protocol (TAP) compatible output","archived":false,"fork":false,"pushed_at":"2021-04-15T02:37:34.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-11-29T22:21:06.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unode.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-05-16T02:24:08.000Z","updated_at":"2021-04-15T02:37:36.000Z","dependencies_parsed_at":"2022-09-19T09:01:28.762Z","dependency_job_id":null,"html_url":"https://github.com/unode/simpletap","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/unode/simpletap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unode%2Fsimpletap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unode%2Fsimpletap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unode%2Fsimpletap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unode%2Fsimpletap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unode","download_url":"https://codeload.github.com/unode/simpletap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unode%2Fsimpletap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32745148,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:29:20.606Z","updated_at":"2026-05-07T16:05:29.826Z","avatar_url":"https://github.com/unode.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\nSimpleTAP\n=========\n\n``simpletap`` is a test runner that integrates with the unittest framework to\nproduce `TAP (Test Anything Protocol) \u003chttps://en.wikipedia.org/wiki/Test_Anything_Protocol\u003e`__ compatible output.\n\n.. image:: https://github.com/unode/simpletap/actions/workflows/main.yaml/badge.svg\n    :target: https://github.com/unode/simpletap/actions/\n\nUsage\n-----\n\nIn your test scripts, instead of:\n\n.. code:: python\n\n    if __name__ == \"__main__\":\n        unittest.main()\n\nuse:\n\n.. code:: python\n\n    if __name__ == \"__main__\":\n        from simpletap import TAPTestRunner\n        unittest.main(testRunner=TAPTestRunner(buffer=True))\n\nor if you don't want failures to exit with a non-zero exitcode:\n\n.. code:: python\n\n    if __name__ == \"__main__\":\n        from simpletap import TAPTestRunner\n        unittest.main(testRunner=TAPTestRunner(buffer=True), exit=False)\n\nA small test case like:\n\n.. code:: python\n\n    import unittest\n\n    class IntegerArithmeticTestCase(unittest.TestCase):\n        def testAdd(self):  # test method names begin 'test*'\n            \"test adding values\"\n            self.assertEqual((1 + 2), 3)\n            self.assertEqual(0 + 1, 1)\n\n        def testMultiply(self):\n            \"test multiplying values\"\n            self.assertEqual((0 * 10), 0)\n            self.assertEqual((5 * 8), 40)\n\n        def testFail(self):\n            \"a failing test\"\n            self.assertEqual(0, 1)\n\n        @unittest.expectedFailure\n        def testExpectFail(self):\n            \"we saw this coming\"\n            self.assertEqual(0, 1)\n\n        @unittest.expectedFailure\n        def testUnexpectFail(self):\n            \"someone fixed it already\"\n            self.assertEqual(0, 0)\n\n        @unittest.skipIf(True, \"Skipping this one\")\n        def testSkip(self):\n            \"pending a fix\"\n            self.assertEqual(0, 1)\n\n        def testError(self):\n            \"oops something went wrong\"\n            no_such_variable + 1  # Oops!\n\n    if __name__ == \"__main__\":\n        from simpletap import TAPTestRunner\n        unittest.main(testRunner=TAPTestRunner(buffer=True))\n\nWhen saved in a file called ``test.py`` and executed would produce:\n\n.. code:: TAP\n\n    1..7\n    ok 1 - test.py: test adding values\n    not ok 2 - test.py: oops something went wrong\n    # ERROR: NameError on file test.py line 38 in testError: 'no_such_variable + 1  # Oops!':\n    #        name 'no_such_variable' is not defined\n    ok 3 - test.py: we saw this coming # TODO\n    # EXPECTED_FAILURE: AssertionError on file test.py line 24 in testExpectFail: 'self.assertEqual(0, 1)':\n    #                   0 != 1\n    not ok 4 - test.py: a failing test\n    # FAIL: AssertionError on file test.py line 19 in testFail: 'self.assertEqual(0, 1)':\n    #       0 != 1\n    ok 5 - test.py: test multiplying values\n    ok 6 - test.py: pending a fix # skip\n    # SKIP:\n    #       Skipping this one\n    not ok 7 - test.py: someone fixed it already # FIXED\n    # UNEXPECTED_SUCCESS:\n    #                     testUnexpectFail (__main__.IntegerArithmeticTestCase)\n\nYou can also launch ``simpletap`` directly from the command line in much the same way you do with unittest:\n\n.. code::\n\n    python -m simpletap test.IntegerArithmeticTestCase\n\nTesting\n-------\n\nThe test suite is configured to run via `tox \u003chttp://tox.readthedocs.io/\u003e`__.\n\n\nProjects\n--------\n\n``simpletap`` is currently being used by:\n\n- `taskwarrior \u003chttps://github.com/taskwarrior/task/\u003e`__\n- `firefox_decrypt \u003chttps://github.com/unode/firefox_decrypt/\u003e`__\n\n\nChangelog\n---------\n\n2.0.0\n^^^^^\n\n- ``skip`` keyword is no longer used. Now fully compliant with `TAP \u003chttps://en.wikipedia.org/wiki/Test_Anything_Protocol\u003e`__ using ``ok``/``not ok``\n- ``SKIP`` now results in ``ok``\n- ``EXPECTED_FAILURE`` now results in ``ok``\n- ``UNEXPECTED_SUCCESS`` is now explicitly handled and results in ``not ok``\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funode%2Fsimpletap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funode%2Fsimpletap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funode%2Fsimpletap/lists"}