def TestClasses(module):
  """returns test classes in a module."""
  classes = []
  pattern = re.compile("^Test\w+$")  # only classes starting with "Test"
  for name in dir(module):
    obj = getattr(module, name)
    if type(obj) in (types.ClassType, types.TypeType):
      if pattern.match(name):
        classes.append(name)
  return classes
dataset/ETHPy150Open MacSysadmin/pymacadmin/utilities/diskimage_unittesting/run_image_tests.py/TestClasses/original