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 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. 3
0
class u_WSlang(libpry.AutoTree):
    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        
        
    def test_loadfile(self):
        self.wstext.setWordlist(self.lines)
        lineswordcount = 0
        for line in self.lines:
            for word in line:
                lineswordcount += 1
        assert lineswordcount > len(self.wstext.wordlist)
Esempio n. 4
0
class u_WSlang(libpry.AutoTree):
    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

    def test_loadfile(self):
        self.wstext.setWordlist(self.lines)
        lineswordcount = 0
        for line in self.lines:
            for word in line:
                lineswordcount += 1
        assert lineswordcount > len(self.wstext.wordlist)
Esempio n. 5
0
 def test_load(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     lines = test.load(fh)
     assert lines
Esempio n. 6
0
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert fh
Esempio n. 7
0
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert file == type(fh)
     assert self.filename == fh.name
Esempio n. 8
0
 def test_lines(self):
     test = WSstreamIO(self.filename)
     assert test.lines
Esempio n. 9
0
 def test_load(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     lines = test.load(fh)
     assert lines
Esempio n. 10
0
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert fh
Esempio n. 11
0
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert file == type(fh)
     assert self.filename == fh.name
Esempio n. 12
0
 def test_init2(self):
     test = WSstreamIO('test_wsstreamio.py')
     assert test.words == []
     assert test.lines != []
Esempio n. 13
0
 def test_init1(self):
     test = WSstreamIO()
     assert test.words == []
     assert test.lines == []