Пример #1
0
 def test_populate_matrix1(self):
     words = ['bitspace', 'extras']
     directions = WSdirections()
     test = WSmatrix((7, 9), directions.DiagDwnLeft, words)
     success, matrix, accepted, rejected = test.populate_matrix(
         test.matrix, words)
     assert rejected == []
Пример #2
0
 def test_longlist(self):
     words =['bitspace','extras','officious', 'as','it','may','seem','to','some','considering',
     'the','significance','wonderous','proposals','obstinate','peter','paul','mary','children','christmas',
     'trees','foundations','thrillseeking','frivolous']
     directions = WSdirections()
     test = WSmatrix((7,9),directions.Right|directions.Left|directions.Up|directions.Down,words)
     success, matrix, accepted, rejected = test.populate_matrix(test.matrix, words)
Пример #3
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
Пример #4
0
 def test_populate_matrix(self):
     words = [
         'bitspaceX', 'this', 'one', 'will', 'do', 'just', 'fine',
         'thankyou'
     ]
     directions = WSdirections()
     test = WSmatrix((10, 10), directions.DiagDwnRight | directions.Right,
                     words)
     success, matrix, accepted, rejected = test.populate_matrix(
         test.matrix, words)
     assert rejected == []
Пример #5
0
 def test_longlist(self):
     words = [
         'bitspace', 'extras', 'officious', 'as', 'it', 'may', 'seem', 'to',
         'some', 'considering', 'the', 'significance', 'wonderous',
         'proposals', 'obstinate', 'peter', 'paul', 'mary', 'children',
         'christmas', 'trees', 'foundations', 'thrillseeking', 'frivolous'
     ]
     directions = WSdirections()
     test = WSmatrix((7, 9), directions.Right | directions.Left
                     | directions.Up | directions.Down, words)
     success, matrix, accepted, rejected = test.populate_matrix(
         test.matrix, words)
Пример #6
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
Пример #7
0
 def test_populate_matrix1(self):
     words =['bitspace','extras']
     directions = WSdirections()
     test = WSmatrix((7,9),directions.DiagDwnLeft,words)
     success, matrix, accepted, rejected = test.populate_matrix(test.matrix, words)
     assert rejected == []
Пример #8
0
 def test_populate_matrix(self):
     words =['bitspaceX', 'this','one','will','do', 'just', 'fine', 'thankyou']
     directions = WSdirections()
     test = WSmatrix((10,10),directions.DiagDwnRight | directions.Right,words)
     success, matrix, accepted, rejected = test.populate_matrix(test.matrix, words)
     assert rejected == []