Esempio n. 1
0
 def setUpAll(self):
     self.wsstreamio = WSstreamIO()
     self.wstext = WStext()
     self.wstext.setLanguage('to')
     fh = self.wsstreamio.open('unicode.txt')
     self.wsstreamio.load(fh)
     self.lines = self.wsstreamio.lines
     self.originalEncoding = self.wsstreamio.originalEncoding
Esempio n. 2
0
 def test_lines(self):
     test = WSstreamIO(self.filename)
     assert test.lines
Esempio n. 3
0
 def test_load(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     lines = test.load(fh)
     assert lines
Esempio n. 4
0
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert fh
Esempio n. 5
0
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert file == type(fh)
     assert self.filename == fh.name
Esempio n. 6
0
 def test_init2(self):
     test = WSstreamIO('test_wsstreamio.py')
     assert test.words == []
     assert test.lines != []
Esempio n. 7
0
 def test_init1(self):
     test = WSstreamIO()
     assert test.words == []
     assert test.lines == []