class TestBase(unittest.TestCase):

    def check(self, input, expected_output):
        obj = self.class_under_test(input)
actual_output = obj.get_result()
self.assertEqual(actual_output, expected_output)

def check_all(self):
    for value in self.values:
        self.check(value[0], value[1])


class TestMyClass1(TestBase):
    pass
Python unittest TestCase with inheritance