tools/fuchsia/comparative_tester/test_results.py
def ReadTargetFromJson(path: str) -> Optional[TargetResult]:
  """Takes a file path and attempts to parse a TargetResult from it.

  Args:
    path (str): The location of the JSON-serialized TargetResult to read.

  Returns:
    Optional[TargetResult]: Again, technically should be wrapped in an IO,
        but Python.
  """
  with open(path, "r") as json_file:
    dct = json.load(json_file)
    return TargetResult(
        dct["name"], [ReadTestFromJson(test_dct) for test_dct in dct["tests"]])
Takes a file path and attempts to parse a TargetResult from it.

  Args:
    path (str): The location of the JSON-serialized TargetResult to read.

  Returns:
    Optional[TargetResult]: Again, technically should be wrapped in an IO,
        but Python.
  
Takes a file path and attempts to parse a TargetResult from it.
Takes a file path and attempts to parse a TargetResult from it .
def ReadTargetFromJson(path: str) -> Optional[TargetResult]:
  with open(path, "r") as json_file:
    dct = json.load(json_file)
    return TargetResult(
        dct["name"], [ReadTestFromJson(test_dct) for test_dct in dct["tests"]])
def ReadTargetFromJson ( path : str ) -> Optional [ TargetResult ] : with open ( path , "r" ) as json_file : dct = json . load ( json_file ) return TargetResult ( dct [ "name" ] , [ ReadTestFromJson ( test_dct ) for test_dct in dct [ "tests" ] ] )
Takes a file path and attempts to parse a TargetResult from it.
Takes a file path and attempts to parse a TargetResult from it .
"""Takes a file path and attempts to parse a TargetResult from it.

  Args:
    path (str): The location of the JSON-serialized TargetResult to read.

  Returns:
    Optional[TargetResult]: Again, technically should be wrapped in an IO,
        but Python.
  """
Again, technically should be wrapped in an IO,
but Python.
Again technically should be wrapped in an IO but Python .
Optional[TargetResult]
path
str
The location of the JSON-serialized TargetResult to read.
The location of the JSON - serialized TargetResult to read .