Пример #1
0
class TestWar(unittest.TestCase):
    def setUp(self):
        self.game = War()

    def test_play(self):
        self.assertIsInstance(self.game.play(), int)

    def test_game_is_over(self):
        self.assertFalse(self.game.game_is_over())
        self.game.play()
        self.assertTrue(self.game.game_is_over())
Пример #2
0
class TestWar(unittest.TestCase):

    def setUp(self):
        self.game = War()

    def test_play(self):
        self.assertIsInstance(self.game.play(), int)

    def test_game_is_over(self):
        self.assertFalse(self.game.game_is_over())
        self.game.play()
        self.assertTrue(self.game.game_is_over())