

def test_rst_render_success(self):
    self.create_file('good.rst', contents=dedent('\n    A good link:\n\n    * `RB #2363 <https://rbcommons.com/s/twitter/r/2363/>`_\n    '))
    good_rst = self.make_target(':good_rst', target_type=Page, source='good.rst')
    context = self.context(target_roots=[good_rst])
    task = self.create_task(context)
    task.execute()
    with open(self.get_rendered_page(context, good_rst, 'good.html')) as fp:
        html = fp.read()
        soup = bs4.BeautifulSoup(markup=html)
        self.assertIsNotNone(soup.find(text='A good link:'))
        unordered_list = soup.find(name='ul')
        self.assertIsNotNone(unordered_list)
        list_item = unordered_list.find('li')
        self.assertIsNotNone(list_item)
        anchor = list_item.find('a', attrs={
            'href': 'https://rbcommons.com/s/twitter/r/2363/',
        }, text='RB #2363')
        self.assertIsNotNone(anchor)

dataset/ETHPy150Open pantsbuild/pants/tests/python/pants_test/backend/docgen/tasks/test_markdown_to_html.py MarkdownToHtmlTest.test_rst_render_success/original