Example #1
0
 def test_033(self):
     """ Page store/load - unicode - latin """
     page = Page(text="hāllo world, goodbye")
     page.store('files/tmp.txt')
     page._words = None
     page.load('files/tmp.txt')
     self.assertEqual(towords(page.words), ["hāllo", "world", "goodbye"])
     os.remove("files/tmp.txt")
     Page.ROMAN = True
     page = Page(text="québec")
     page.store('files/tmp.txt')
     page._words = None
     page.load('files/tmp.txt')
     Page.ROMAN = False
     self.assertEqual(towords(page.words), ["quebec"])
     os.remove("files/tmp.txt")
Example #2
0
 def xtest_bugs(self):
     """ Page store/load - unicode - cryllic """
     page = Page(text="Й й")
     page.store('files/tmp.txt')
     page._words = None
     page.load('files/tmp.txt')
     os.remove("files/tmp.txt")
     self.assertEqual(towords(page.words), ["Й", "й"])
Example #3
0
 def test_032(self):
     """ Page store/load """
     page = Page(text="hello world, goodbye")
     page.store('files/tmp.txt')
     page._words = None
     page.load('files/tmp.txt')
     os.remove("files/tmp.txt")
     self.assertEqual(towords(page.words), ["hello", "world", "goodbye"])