def testDocCommentBlocks(self):

    def Render(language, text, block):
      context = self._GetContext()
      lang_node = template_helpers.LanguageNode(language)
      lang_node.render(context)
      doc_comment_node = template_helpers.DocCommentNode(
          text=text, comment_type='doc', wrap_blocks=block)
      return doc_comment_node.render(context)

    s1 = [('We can all agree that this comment is '
           'almost certain to be too long for a '),
          'single line due to its excessive verbosity.']
    s2 = 'This is short and sweet.'
    text = '\n'.join([''.join(s1), s2])
    no_blocks = Render('cpp', text, False)
    with_blocks = Render('cpp', text, True)
    self.assertNotEqual(no_blocks, with_blocks)
    self.assertTrue((' * %s' % s2) in no_blocks)
    self.assertTrue(s1[1] + ' ' +  s2 in with_blocks)
dataset/ETHPy150Open google/apis-client-generator/src/googleapis/codegen/template_helpers_test.py/TemplateHelpersTest.testDocCommentBlocks/original