def test_move_y_boundary(): with open(f"{TEST_FILE_PATH}/test_input.txt") as f: test_map = f.read().splitlines() test_tt = TobogganTrajectory(input_map=test_map, move_x=3, move_y=1) test_tt.current_y = len(test_tt.base_map) with pytest.raises(OutOfBoundsError): test_tt.move()
def test_check_for_tree(): with open(f"{TEST_FILE_PATH}/test_input.txt") as f: test_map = f.read().splitlines() test_tt = TobogganTrajectory(input_map=test_map) test_tt.current_x = 4 test_tt.current_y = 1 test_tt.check_for_tree() assert test_tt.trees_found == 1