コード例 #1
0
 def setUpAll(self):
     words = [
         'bitspaceX', 'this', 'one', 'will', 'do', 'just', 'fine',
         'thankyou'
     ]
     directions = WSdirections()
     test = WSmatrix((5, 9), directions.DiagDwnRight, words)
     success, matrix, accepted, rejected = test.populate_matrix(
         test.matrix, words)
     self.format = WSformats()
     self.format.matrix = matrix
     self.format.accepted = accepted
     self.format.rejected = rejected
     self.format.solution = test.wordsplaced
コード例 #2
0
ファイル: test_wsmatrix.py プロジェクト: samtaufa/wordsearch
 def setUpAll(self):
     words =['bitspaceX', 'this','one','will','do', 'just', 'fine', 'thankyou']
     directions = WSdirections()
     test = WSmatrix((5,9),directions.DiagDwnRight,words)
     success, matrix, accepted, rejected = test.populate_matrix(test.matrix, words)
     self.format = WSformats()
     self.format.matrix = matrix
     self.format.accepted = accepted
     self.format.rejected = rejected
     self.format.solution = test.wordsplaced
コード例 #3
0
ファイル: test_wsmatrix.py プロジェクト: samtaufa/wordsearch
class u_WSformats(libpry.AutoTree):
    def setUpAll(self):
        words =['bitspaceX', 'this','one','will','do', 'just', 'fine', 'thankyou']
        directions = WSdirections()
        test = WSmatrix((5,9),directions.DiagDwnRight,words)
        success, matrix, accepted, rejected = test.populate_matrix(test.matrix, words)
        self.format = WSformats()
        self.format.matrix = matrix
        self.format.accepted = accepted
        self.format.rejected = rejected
        self.format.solution = test.wordsplaced
        
    def tearDownAll(self):
        pass
    def test_html(self):
        self.format.html()
        #~ print self.format.acceptedFormatted
        #~ print self.format.matrixFormatted
        #~ print self.format.solutionFormatted
    def test_unicode(self):
        self.format.unicode()
        #~ print self.format.acceptedFormatted
        #~ print self.format.matrixFormatted
        #~ print self.format.solutionFormatted
    def test_xml(self):
        pass
    def test_getLetter(self):
        self.format.fillLetterBin()
コード例 #4
0
class u_WSformats(libpry.AutoTree):
    def setUpAll(self):
        words = [
            'bitspaceX', 'this', 'one', 'will', 'do', 'just', 'fine',
            'thankyou'
        ]
        directions = WSdirections()
        test = WSmatrix((5, 9), directions.DiagDwnRight, words)
        success, matrix, accepted, rejected = test.populate_matrix(
            test.matrix, words)
        self.format = WSformats()
        self.format.matrix = matrix
        self.format.accepted = accepted
        self.format.rejected = rejected
        self.format.solution = test.wordsplaced

    def tearDownAll(self):
        pass

    def test_html(self):
        self.format.html()
        #~ print self.format.acceptedFormatted
        #~ print self.format.matrixFormatted
        #~ print self.format.solutionFormatted
    def test_unicode(self):
        self.format.unicode()
        #~ print self.format.acceptedFormatted
        #~ print self.format.matrixFormatted
        #~ print self.format.solutionFormatted
    def test_xml(self):
        pass

    def test_getLetter(self):
        self.format.fillLetterBin()