parameters: (suites, pathname)
docstring: Writes the report.json file if requested.
docstring_summary: Writes the report.json file if requested.
docstring_tokens: Writes the report . json file if requested .
function: def _write_report_file(suites, pathname):
      """
      Writes the report.json file if requested.
      """
  
      reports = []
      for suite in suites:
          for group in suite.test_groups:
              reports.extend(group.get_reports())
  
      combined_report_dict = resmokelib.testing.report.TestReport.combine(*reports).as_dict()
      with open(pathname, "w") as fp:
          json.dump(combined_report_dict, fp)
function_tokens: def _write_report_file ( suites , pathname ) : reports = [ ] for suite in suites : for group in suite . test_groups : reports . extend ( group . get_reports ( ) ) combined_report_dict = resmokelib . testing . report . TestReport . combine ( * reports ) . as_dict ( ) with open ( pathname , "w" ) as fp : json . dump ( combined_report_dict , fp )