def Generate(self, project_configuration, output_writer):
    tests_path = os.path.join(
        self._projects_directory, project_configuration.library_name, u'tests')

    if not os.path.exists(tests_path):
      return

    # TODO: handle get_version header include order?
    # TODO: handle non-template files differently.
    # TODO: generate test_api_functions.sh based on library public_functions?
    # TODO: yal_test_open_close.c handle file, handle, volume
    # TODO: set x-bit for .sh scripts

    library_header = u'yal_test_{0:s}.h'.format(
        project_configuration.library_name)

    template_mappings = project_configuration.GetTemplateMappings()
    template_mappings[u'library_public_types'] = u' '.join(
        project_configuration.library_public_types)

    for directory_entry in os.listdir(self._template_directory):
      # Ignore yal_test_library.h in favor of yal_test_libyal.h
      if directory_entry == library_header:
        continue

      template_filename = os.path.join(
          self._template_directory, directory_entry)
      if not os.path.isfile(template_filename):
        continue

      if directory_entry == u'yal_test_libyal.h':
        output_filename = u'{0:s}_test_{1:s}.h'.format(
            project_configuration.library_name_suffix,
            project_configuration.library_name)

      elif directory_entry.startswith(u'yal_test_'):
        output_filename = u'{0:s}_{1:s}'.format(
            project_configuration.library_name_suffix, directory_entry[4:])

      elif directory_entry.startswith(u'pyyal_test_'):
        output_filename = u'{0:s}_{1:s}'.format(
            project_configuration.python_module_name, directory_entry[6:])

      elif (directory_entry.startswith(u'test_yal') and
            directory_entry.endswith(u'.sh')):
        output_filename = u'test_{0:s}{1:s}'.format(
            project_configuration.library_name_suffix, directory_entry[8:])

      elif (directory_entry.startswith(u'test_pyyal') and
            directory_entry.endswith(u'.sh')):
        output_filename = u'test_{0:s}{1:s}'.format(
            project_configuration.python_module_name, directory_entry[10:])

      else:
        output_filename = directory_entry

      output_filename = os.path.join(u'tests', output_filename)
      if not os.path.exists(output_filename):
        continue

      self._GenerateSection(
          template_filename, template_mappings, output_writer, output_filename)
This method is intended to be called from
dataset/ETHPy150Open libyal/libyal/scripts/source-generate.py/TestsSourceFileGenerator.Generate--crossover with--dataset/ETHPy150Open chromium/web-page-replay/httpproxy.py/_HandleSSLCertificateError