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), ["Й", "й"])
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"])
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")
def test_044(self): """ load() - not a valid path """ page = Page() with pytest.raises(FileNotFoundError): page.load('foo/goo/hoo.json')
def test_043(self): """ load() - not a valid type """ page = Page() with pytest.raises(TypeError): page.load(12)