🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

html-test-report

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-test-report

Python unittest runner with html report.

1.1.3
PyPI
Maintainers
1

'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

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts