Exemple #1
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)
Exemple #2
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)
 def test_load(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     lines = test.load(fh)
     assert lines
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert fh
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert file == type(fh)
     assert self.filename == fh.name
Exemple #6
0
 def test_load(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     lines = test.load(fh)
     assert lines
Exemple #7
0
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert fh
Exemple #8
0
 def test_open(self):
     test = WSstreamIO()
     fh = test.open(self.filename)
     assert file == type(fh)
     assert self.filename == fh.name