parameters: (self, path)
return_statement: return [self.host.filesystem.relpath(test, self.layout_tests_dir()) for test in self._filesystem.glob(re.sub('-expected.*', '.*', self._filesystem.join(self.layout_tests_dir(), path))) if self._filesystem.isfile(test)]
docstring: Return potential test names if any from a potential expected file path, relative to LayoutTests directory.
docstring_summary: Return potential test names if any from a potential expected file path, relative to LayoutTests directory.
docstring_tokens: Return potential test names if any from a potential expected file path relative to LayoutTests directory .
function: def potential_test_names_from_expected_file(self, path):
          """Return potential test names if any from a potential expected file path, relative to LayoutTests directory."""
  
          if not '-expected.' in path:
              return None
  
          subpath = self.host.filesystem.relpath(path, self.layout_tests_dir())
          if path.startswith('platform' + self._filesystem.sep):
              steps = path.split(self._filesystem.sep)
              path = self._filesystem.join(self._filesystem.sep.join(steps[2:]))
  
          return [self.host.filesystem.relpath(test, self.layout_tests_dir()) for test in self._filesystem.glob(re.sub('-expected.*', '.*', self._filesystem.join(self.layout_tests_dir(), path))) if self._filesystem.isfile(test)]
function_tokens: def potential_test_names_from_expected_file ( self , path ) : if not '-expected.' in path : return None subpath = self . host . filesystem . relpath ( path , self . layout_tests_dir ( ) ) if path . startswith ( 'platform' + self . _filesystem . sep ) : steps = path . split ( self . _filesystem . sep ) path = self . _filesystem . join ( self . _filesystem . sep . join ( steps [ 2 : ] ) ) return [ self . host . filesystem . relpath ( test , self . layout_tests_dir ( ) ) for test in self . _filesystem . glob ( re . sub ( '-expected.*' , '.*' , self . _filesystem . join ( self . layout_tests_dir ( ) , path ) ) ) if self . _filesystem . isfile ( test ) ]