def testBar(self):
    self.assertEqual(average([11]), 11)

def testBaz(self):
    self.assertEqual(average([20, 20]), 20)

def suite():
    suite = unittest.TestSuite()
suite.addTest(MyTestCase('testFoo'))
suite.addTest(MyTestCase('testBar'))
suite.addTest(MyTestCase('testBaz'))
return suite
print(suite())
With Python unittest, how do I create and use a "callable object that returns a test suite"?