def _get_filename(fd):
 if hasattr(fd, 'name'):
  return fd.name
 return fd

def _get_filename ( fd ) : if hasattr ( fd , 'name' ) : return fd . name return fd
transform the absolute test filenames to relative ones .