from unittest import FunctionTestCase def f(): assert True case = FunctionTestCase(f)