Skip to content

adelplanque/html-test-report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

'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

About

Python test runner with django-like error report.

Resources

License

Stars

Watchers

Forks

Packages

No packages published