Skip to main content

Python unittest runner with html report.

Project description

'Because testing should help, not constrain.'

Example

  • Source code: my_bugged_module.py

     def my_bugged_function():
         my_var = {'a': 'b'}
         1/0
    
  • Test case: test.py

    from logging import getLogger
    from my_bugged_module import my_bugged_function
    from unittest import TestCase
    
    
    class MyTestCase(TestCase):
    
        def test(self):
            """
            Test example.
            """
            print("Print something")
            getLogger().info("Log message")
            my_bugged_function()
    
  • Result:

    Test report

Use as nose plugin

nosetests --with-html-test test

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

html_test_report-1.1.2.tar.gz (123.4 kB view details)

Uploaded Source

File details

Details for the file html_test_report-1.1.2.tar.gz.

File metadata

  • Download URL: html_test_report-1.1.2.tar.gz
  • Upload date:
  • Size: 123.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for html_test_report-1.1.2.tar.gz
Algorithm Hash digest
SHA256 c54753b65551db43bdbcec4064ea9c11bb341df1703085694da77f9d705a2cd7
MD5 35c347577046015b30ae58aab341732b
BLAKE2b-256 9e4c5c3d7cb36d666b5379187448e80b86c7acfef2cf6dfbb18c84b0959070a1

See more details on using hashes here.

Supported by

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