This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

simpletap is a test runner that integrates with the unittest framework to produce TAP (Test Anything Protocol) compatible output.

simpletap has been extensively tested under Python 2.7 and is considered production ready.
Python 3.4-3.5 is also supported but has not seen as much testing.


In your test scripts, instead of:

if __name__ == "__main__":


if __name__ == "__main__":
    from simpletap import TAPTestRunner

A small test case like:

import unittest

class IntegerArithmeticTestCase(unittest.TestCase):
    def testAdd(self):  # test method names begin 'test*'
        "test adding values"
        self.assertEqual((1 + 2), 3)
        self.assertEqual(0 + 1, 1)

    def testMultiply(self):
        "test multiplying values"
        self.assertEqual((0 * 10), 0)
        self.assertEqual((5 * 8), 40)

    def testFail(self):
        "a failing test"
        self.assertEqual(0, 1)

    def testExpectFail(self):
        "we saw this coming"
        self.assertEqual(0, 1)

    @unittest.skipIf(True, "Skipping this one")
    def testSkip(self):
        "pending a fix"
        self.assertEqual(0, 1)

    def testError(self):
        "oops something went wrong"
        no_such_variable + 1  # Oops!

if __name__ == "__main__":
    from simpletap import TAPTestRunner

When saved in a file called and executed would produce:

ok 1 - test adding values
not ok 2 - oops something went wrong
# ERROR: NameError on file line 30 in testError: 'no_such_variable + 1  # Oops!':
#        global name 'no_such_variable' is not defined
skip 3 - we saw this coming
# EXPECTED_FAILURE: AssertionError on file line 21 in testExpectFail: 'self.assertEqual(0, 1)':
#                   0 != 1
not ok 4 - a failing test
# FAIL: AssertionError on file line 16 in testFail: 'self.assertEqual(0, 1)':
#       0 != 1
ok 5 - test multiplying values
skip 6 - pending a fix
#       Skipping this one

You can also launch simpletap directly from the command line in much the same way you do with unittest:

python -m simpletap test.IntegerArithmeticTestCase

Deviations from standard

The specification of Test Anything Protocol treats skipped tests as ok.

During the use of this module it was found to be more useful to treat these, as well as expected failures as extensions to the specification under the keyword skip.


The test suite is configured to run via tox.


Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
simpletap-1.0.1-py2-none-any.whl (14.0 kB) Copy SHA256 Checksum SHA256 py2 Wheel May 16, 2016
simpletap-1.0.1-py3-none-any.whl (14.0 kB) Copy SHA256 Checksum SHA256 py3 Wheel May 16, 2016
simpletap-1.0.1.tar.gz (15.6 kB) Copy SHA256 Checksum SHA256 Source May 16, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting