Example #1
0
 def test_render_board(self):
     self.assertIsInstance(
         ttt.render_board([[2, 1, 0], [2, 0, 1], [2, 1, 1]]), str)
     self.assertIn('<table',
                   ttt.render_board([[2, 1, 0], [2, 0, 1], [2, 1, 1]]))
     self.assertIn('</table>',
                   ttt.render_board([[2, 1, 0], [2, 0, 1], [2, 1, 1]]))
     self.assertIn('<tr>',
                   ttt.render_board([[2, 1, 0], [2, 0, 1], [2, 1, 1]]))
     self.assertIn('</tr>',
                   ttt.render_board([[2, 1, 0], [2, 0, 1], [2, 1, 1]]))
     self.assertIn('<td>',
                   ttt.render_board([[2, 1, 0], [2, 0, 1], [2, 1, 1]]))
     self.assertIn('</td>',
                   ttt.render_board([[2, 1, 0], [2, 0, 1], [2, 1, 1]]))
 def test_render_board(self):
     """проверка  формат вывода (str)"""
     self.assertIsInstance(tictactoe.render_board(board), str)
Example #3
0
 def test_return_type_3(self):
     assert isinstance(render_board([[1, 0, 2],[0, 2, 1],[2, 1, 0]]), str)
Example #4
0
 def test_return_type_1(self):
     assert isinstance(render_board(get_board()), str)
Example #5
0
 def test_render3(self):
     self.assertIsInstance(
         tictactoe.render_board([[1, 1, 1], [2, 3, 3], [2, 1, 1]]), str)
Example #6
0
 def test_render2(self):
     self.assertIsInstance(
         tictactoe.render_board([[0, 0, 3], [0, 0, 0], [0, 0, 0]]), str)