oldani / HtmlTestRunner

A Test Runner in python, for Human Readable HTML Reports
MIT License
295 stars 171 forks source link

Result `expected_failure` and `unexpected_success`, they appear in the console, but not in HTML #73

Open dongfangtianyu opened 4 years ago

dongfangtianyu commented 4 years ago

Description

class TestCase(unittest.TestCase):

    @unittest.expectedFailure
    def test_xfail(self):
        assert False

    @unittest.expectedFailure
    def test_xpaas(self):
        assert True

test code get result expected_failure and unexpected_success,
they appear in the console, but not in HTML

What I Did

Running tests... 
----------------------------------------------------------------------
 test_error (testcases.test_A.TestCase) ... ERROR (0.000996)s
 test_fail (testcases.test_A.TestCase) ... FAIL (0.000000)s
 test_log (testcases.test_A.TestCase) ... OK (0.000000)s
 test_pass (testcases.test_A.TestCase) ... OK (0.000000)s
 test_skip (testcases.test_A.TestCase) ... SKIP (0.000000)s
 test_xfail (testcases.test_A.TestCase) ... expected failure (0.000000)s
 test_xpaas (testcases.test_A.TestCase) ... unexpected success (0.000000)s