コード例 #1
0
 def testFrPages(self):
     for index, page_id in enumerate(self.fr_test_page_ids):
         content = WikipediaExtract().output_page_id(page_id,
                                                     'data/test_pages',
                                                     'fr',
                                                     index,
                                                     b_output_raw=True,
                                                     b_debug=True)
         self.content_assertions(content)
コード例 #2
0
 def testReferenceCitation(self):
     markup = """Some text [1] followed by the rest of the sentence.[2] As a discipline, it is focused on the branch of economics known as microeconomics."""
     expected = """Some text  followed by the rest of the sentence. As a discipline, it is focused on the branch of economics known as microeconomics."""
     self.assertEqual(WikipediaExtract().strip_markup(markup), expected)