def test_sample1(monkeypatch, capsys): """Using Sample Run 1 values, this test case checks for 31 in your program's output.""" monkeypatch.setattr('builtins.input', mock_sample1_input) prompts.clear() inputs.clear() Calendar.main() output = capsys.readouterr().out assert "31" in output
def lob(): solutions = sol.main(toMatrix(board)) for i in range(solutions[2]): global solution solu = solutions[1][i] empty_index = board.index(EMPTY_SQUARE) if solu == 'R': board_index = empty_index - 1 elif solu == 'L': board_index = empty_index + 1 elif solu == 'U': board_index = empty_index + 4 elif solu == 'D': board_index = empty_index - 4 empty_index = get_empty_neighbor(board_index) board[board_index], board[empty_index] = board[empty_index], board[ board_index] solution.append(board[empty_index] ) if board[empty_index] != 16 else solution.append(0) draw_board() if board == correct_board: print(solution) show_victory_plate() root.after(500) root.update()
def test_large(self): self.assertEqual("5537376230390876637302048746832985971773659831892672", sol.main(thisDir + "/input"))
def test_1(self): self.assertEqual(13, sol.main(6))
def test_2(self): self.assertEqual(232792560, sol.main(20))
def test_sol_small(self): self.assertEqual(101, sol.main(5))
def test_sol_4(self): self.assertEqual(19316, sol.main(4))
def test_12(self): self.assertEqual(60, sol.main(12))
def test_main(self): self.assertEqual(171, sol.main(1901, 2000))
def test_small(self): self.assertEqual(2427, sol.main(thisDir + "/input_small"))
def test_221(self): self.assertEqual(220, sol.main(221))
def test_10000(self): self.assertEqual(31626, sol.main(10000))
def test_1(self): self.assertEqual(4613732, sol.main(4e6))
def test_2(self): self.assertEqual(25164150, sol.main(100))
def test_2(self): self.assertEqual(142913828922, sol.main(2e6))
def test_1(self): self.assertEqual(70600674, sol.main(thisDir + "/input"))
def test_sol(self): self.assertEqual(4179871, sol.main())
def test_count_10(self): self.assertEqual(27, sol.main(10))
def test_count_15(self): self.assertEqual(26, sol.main(15))
def test_sol_213(): assert sol.main([2, 1, 3]) == 10
def test_sol_123(): assert sol.main([1, 2, 3]) == 27
def test_sol_5(self): self.assertEqual(443839, sol.main(5))
def test_sol_231(): assert sol.main([2, 3, 1]) == 78
def test_sol(self): self.assertEqual(669171001, sol.main(1001))
def test_sol_321(): assert sol.main([3, 2, 1]) == 438
def test_2(self): self.assertEqual(104743, sol.main(10001))
def test_sol_312(): assert sol.main([3, 1, 2]) == 1836
def test_main(self): self.assertEqual(21124, sol.main(1000))
def test_sol_036(): assert sol.main([0, 3, 6]) == 436
def test_2(self): self.assertEqual(233168, sol.main(1000))
def test_sol_132(): assert sol.main([1, 3, 2]) == 1
def test_1(self): self.assertEqual(17, sol.main(10))
def test_count_2(self): self.assertEqual(6, sol.main(2, 2))
def test_1(self): self.assertEqual(40824, sol.main(thisDir + "/input"))
def test_count_20(self): self.assertEqual(137846528820, sol.main(20, 20))
def test_count_100(self): self.assertEqual(648, sol.main(100))
def test_count_1(self): self.assertEqual(2, sol.main(1, 1))
def test_sol(self): self.assertEqual("2783915460", sol.main(9, 1e6))
def test_1000(self): self.assertEqual(31875000, sol.main(1000))