def _FileToModuleName(filename):
  _, lib, suffix = filename.partition('$PYTHON_LIB/')
  if lib:
    module = suffix
  else:
    module = filename
  module = os.path.normpath(module)
  if '.py' in module:
    module = module.rpartition('.py')[0]
  module = module.replace(os.sep, '.')
  module = module.strip('.')
  if module.endswith('.__init__'):
    module = module.rpartition('.__init__')[0]
  return module
This method is called before any tests are run.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/runtime/cgi.py/_FileToModuleName--crossover with--dataset/ETHPy150Open nasa/mplStyle/mplStyle/types/test/test_lib.py/Testlib.setUp