Skip to main content

A Test Runner in python, for Human Readable HTML Reports

Project description

https://img.shields.io/pypi/v/test_cover.svg https://img.shields.io/travis/usalko/test_cover.svg

HtmlTest runner is a unittest test runner that save test results in Html files, for human readable presentation of results.

This Package is a fork html-testRunner.

Usage:

import test_cover
import unittest


class TestStringMethods(unittest.TestCase):

    def test_upper(self):
        self.assertEqual('foo'.upper(), 'FOO')

    def test_error(self):
        """ This test should be marked as error one. """
        raise ValueError

    def test_fail(self):
        """ This test should fail. """
        self.assertEqual(1, 2)

    @unittest.skip("This is a skipped test.")
    def test_skip(self):
        """ This test should be skipped. """
        pass

if __name__ == '__main__':
    unittest.main(testRunner=test_cover.HtmlTestRunner(output='example_dir'))

As simple as import the class an initialize it, it only have one request parameter that is output, this one is use to place the report in a sub direcotry in reports directory.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

test_cover-0.1.0.tar.gz (540.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

test_cover-0.1.0-py2.py3-none-any.whl (14.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file test_cover-0.1.0.tar.gz.

File metadata

  • Download URL: test_cover-0.1.0.tar.gz
  • Upload date:
  • Size: 540.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for test_cover-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ea626efdee703809cdb48842745cd89a8b360ce6a0d81a85bdfcbf3da6669464
MD5 2819fc0c106b911e8ff59f4cad84eaf3
BLAKE2b-256 bb4f1e8203d16203b92d1cd45ec0bd6115bdbaf2a12d3195b9675852a952e148

See more details on using hashes here.

File details

Details for the file test_cover-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: test_cover-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 14.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.16

File hashes

Hashes for test_cover-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 18872f012e3fd06390fc2a3763ae4327b1e1ee336522fde37dcc2dbad6cc267c
MD5 d35f98517a848be177efbd07f168ed62
BLAKE2b-256 6a44b0a06d80cf948180ccabc05d2d555e6efb6d204adeabf553ca3bfc97edf3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page