import sys from typing import List from unittest.case import TestCase from unitpy.Test import Test from unitpy.RunWith import RunWith from unitpy.Runner import JUnit4ClassRunner from unitpy.Runner import runTests def g(): raise AttributeError("g") @RunWith(JUnit4ClassRunner) class FailingTest: ''' has a good and two failing tests. One failing test raises explicit error. Another does a failing asssert. ''' @Test() def goodtest(self): TestCase().assertEquals(1,1) @Test() def failedtest(self): try: g() except Exception as e: raise AssertionError("this is wrong") from e @Test() def failedtest2(self): TestCase().assertEquals(0,1) class Test(TestCase): def test(self): runTests(FailingTest)