def test_internal_link_in_man_page(self): style = ReSTStyle(ReSTDocument()) style.doc.target = 'man' style.internal_link('MyLink', '/index') self.assertEqual(style.doc.getvalue(), b'MyLink')
def test_internal_link(self): style = ReSTStyle(ReSTDocument()) style.doc.target = 'html' style.internal_link('MyLink', '/index') self.assertEqual(style.doc.getvalue(), b':doc:`MyLink </index>`')