For the following code:
import unittest class Test(unittest.TestCase): def test1(self): assert(True == True) if __name__ == \"__main__\": s
You need to invoke a TestLoader:
if __name__ == "__main__": suite = unittest.defaultTestLoader.loadTestsFromTestCase(Test) unittest.TextTestRunner().run(suite)