parameters: (self, finished_tests, reference)
docstring: Take a series of completed tests and write results to file
          :param finished_tests: A list of instantiated test objects that have run their tests.
          :param reference: A reference to look up results
docstring_summary: Take a series of completed tests and write results to file
          :param finished_tests: A list of instantiated test objects that have run their tests.
          :param reference: A reference to look up results
docstring_tokens: Take a series of completed tests and write results to file : param finished_tests : A list of instantiated test objects that have run their tests . : param reference : A reference to look up results
function: def write_results(self, finished_tests, reference):
          """
          Take a series of completed tests and write results to file
          :param finished_tests: A list of instantiated test objects that have run their tests.
          :param reference: A reference to look up results
          """
  
          if self.html:
              self.output.write('<tr><td>')
              self.output.write('<a href="http://draft.sefaria.org/{}">'.format(reference.replace(' ', '_')))
              self.output.write('{}'.format(reference))
              self.output.write('</a></td>')
  
          else:
              self.output.write('{},'.format(reference))
  
          for test in finished_tests:
  
              if self.html:
                  self.output.write('<td>')
                  test.output_result(reference, self.output)
                  self.output.write('</td>')
              else:
                  test.output_result(reference, self.output)
                  self.output.write(',')
  
          if self.html:
              self.output.write('</tr>')
          else:
              self.output.write('\n')
  
          if not Ref(reference).is_segment_level():
              for ref in Ref(reference).all_subrefs():
                  self.write_results(finished_tests, ref.uid())
function_tokens: def write_results ( self , finished_tests , reference ) : if self . html : self . output . write ( '<tr><td>' ) self . output . write ( '<a href="http://draft.sefaria.org/{}">' . format ( reference . replace ( ' ' , '_' ) ) ) self . output . write ( '{}' . format ( reference ) ) self . output . write ( '</a></td>' ) else : self . output . write ( '{},' . format ( reference ) ) for test in finished_tests : if self . html : self . output . write ( '<td>' ) test . output_result ( reference , self . output ) self . output . write ( '</td>' ) else : test . output_result ( reference , self . output ) self . output . write ( ',' ) if self . html : self . output . write ( '</tr>' ) else : self . output . write ( '\n' ) if not Ref ( reference ) . is_segment_level ( ) : for ref in Ref ( reference ) . all_subrefs ( ) : self . write_results ( finished_tests , ref . uid ( ) )