def as_unittest(func):
 class Tester(unittest.TestCase, ):
  def test(self):
   func()
 Tester.__name__ = func.__name__
 return Tester

def as_unittest ( func ) : class Tester ( unittest . TestCase , ) : def test ( self ) : func ( ) Tester . __name__ = func . __name__ return Tester
decorator to make a simple function into a normal test via unittest .