def test_draw_lines_2(self): w_d = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) trainer = game(1, 2, 3, "ъ.txt", "HardBass.mp3", True, w_d, '') lines = 'Aasiooijoiqke' try: game.draw_lines(trainer, lines, 10, 6) except Exception as e: raise e
def test_draw_lines(self): w_d = pygame.display.set_mode((0, 0), pygame.FULLSCREEN) trainer = game(1, 2, 3, "ъ.txt", "HardBass.mp3", True, w_d, '') lines = ["Aasqkedpokqepod", "FqepodaaJfwefewadsa", "FdoJdasdefasdo"] try: game.draw_lines(trainer, lines, 5, 2) except Exception as e: raise e
def test_strip_lines(self): text = ['To be,\n', "to suffer\n"] t_1 = game.strip_lines(text) self.assertEqual(['To be, ', "to suffer "], t_1)
def test_back_line(self): self.assertEqual((5, 5), game.back_line([10, 20, 30], 5, 6)) self.assertEqual((0, 0), game.back_line([12, 20, 30], 5, 6))
def test_skip_line(self): self.assertEqual((20, 0), game.skip_line([10, 20, 30], 5, 6))
def test_add_letter(self): self.assertEqual((3, 3), game.add_letter(3, 2, 1)) self.assertEqual((6, -2), game.add_letter(0, -2, 6))
def test_subtract_letters(self): self.assertEqual((0, 0), game.subtract_letter(1, 2, 3)) self.assertEqual((3, 1), game.subtract_letter(3, 2, 1)) self.assertEqual((0, 0), game.subtract_letter(0, 2, 6))