# ==============================================================================
# AUTOGENERATED FILE - DO NOT MODIFY
# This file was generated by the script `generate_interface_commands.py`.
# Any modifications may be overwritten.
# Generated on: 2024-06-27 11:16:56
# ==============================================================================

from .conftest import ensure_successful_parsing, new_tao


def test_beam_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/csr_beam_tracking/tao.init",
        ) as tao:
            tao.beam(ix_uni="1", ix_branch="0", verbose=True)


def test_beam_init_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/csr_beam_tracking/tao.init",
        ) as tao:
            tao.beam_init(ix_uni="1", ix_branch="0", verbose=True)


def test_bmad_com_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.bmad_com(verbose=True)


def test_branch1_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.branch1(ix_uni="1", ix_branch="0", verbose=True)


def test_bunch_comb_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/csr_beam_tracking/tao.init",
        ) as tao:
            tao.bunch_comb(who="x.beta", verbose=True)


def test_bunch_params_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/csr_beam_tracking/tao.init",
        ) as tao:
            tao.bunch_params(ele_id="end", which="model", verbose=True)


def test_bunch1_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/csr_beam_tracking/tao.init",
        ) as tao:
            tao.bunch1(ele_id="end", coordinate="x", which="model", ix_bunch="1", verbose=True)


def test_building_wall_list_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_wall"
        ) as tao:
            tao.building_wall_list(ix_section="", verbose=True)


def test_building_wall_list_2(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_wall"
        ) as tao:
            tao.building_wall_list(ix_section="1", verbose=True)


def test_building_wall_graph_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_wall"
        ) as tao:
            tao.building_wall_graph(graph="floor_plan.g", verbose=True)


def test_building_wall_point_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_wall"
        ) as tao:
            tao.building_wall_point(
                ix_section="1",
                ix_point="1",
                z="0",
                x="0",
                radius="0",
                z_center="0",
                x_center="0",
                verbose=True,
            )


def test_building_wall_section_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.building_wall_section(
                ix_section="1", sec_name="test", sec_constraint="none", verbose=True
            )


def test_constraints_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.constraints(who="data", verbose=True)


def test_constraints_2(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.constraints(who="var", verbose=True)


def test_data_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.data(ix_uni="", d2_name="twiss", d1_name="end", dat_index="1", verbose=True)


def test_data_2(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.data(ix_uni="1", d2_name="twiss", d1_name="end", dat_index="1", verbose=True)


def test_data_d_array_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.data_d_array(ix_uni="1", d2_name="twiss", d1_name="end", verbose=True)


def test_data_d1_array_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.data_d1_array(ix_uni="1", d2_datum="twiss", verbose=True)


def test_data_d2_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.data_d2(ix_uni="1", d2_name="twiss", verbose=True)


def test_data_d2_array_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.data_d2_array(ix_uni="1", verbose=True)


def test_data_d2_create_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.data_d2_create(
                ix_uni="1",
                d2_name="orbit",
                n_d1_data="2",
                d_data_arrays_name_min_max="x^^0^^45^^y^^1^^47",
                verbose=True,
            )


def test_data_d2_destroy_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.data_d2_destroy(d2_name="orbit", verbose=True)


def test_data_parameter_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.data_parameter(data_array="twiss.end", parameter="model_value", verbose=True)


def test_data_set_design_value_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.data_set_design_value(verbose=True)


def test_datum_create_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.datum_create(
                datum_name="twiss.end[6]",
                data_type="beta.y",
                ele_ref_name="",
                ele_start_name="",
                ele_name="P1",
                merit_type="target",
                meas="0",
                good_meas="T",
                ref="0",
                good_ref="T",
                weight="0.3",
                good_user="T",
                data_source="lat",
                eval_point="END",
                s_offset="0",
                ix_bunch="1",
                invalid_value="0",
                verbose=True,
            )


def test_datum_has_ele_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.datum_has_ele(datum_type="twiss.end", verbose=True)


def test_derivative_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.derivative(verbose=True)


def test_ele_ac_kicker_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_ac_kicker(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_cartesian_map_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_em_field",
        ) as tao:
            tao.ele_cartesian_map(
                ele_id="1@0>>1", which="model", index="1", who="base", verbose=True
            )


def test_ele_chamber_wall_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_wall3d"
        ) as tao:
            tao.ele_chamber_wall(
                ele_id="1@0>>1", which="model", index="1", who="x", verbose=True
            )


def test_ele_control_var_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_control_var(ele_id="1@0>>873", which="model", verbose=True)


def test_ele_cylindrical_map_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_em_field",
        ) as tao:
            tao.ele_cylindrical_map(
                ele_id="1@0>>5", which="model", index="1", who="base", verbose=True
            )


def test_ele_elec_multipoles_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_elec_multipoles(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_floor_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_floor(ele_id="1@0>>1", which="model", where="", verbose=True)


def test_ele_floor_2(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_floor(ele_id="1@0>>1", which="model", where="center", verbose=True)


def test_ele_gen_attribs_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_gen_attribs(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_gen_grad_map_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_em_field",
        ) as tao:
            tao.ele_gen_grad_map(
                ele_id="1@0>>9", which="model", index="1", who="derivs", verbose=True
            )


def test_ele_grid_field_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_grid"
        ) as tao:
            tao.ele_grid_field(
                ele_id="1@0>>1", which="model", index="1", who="base", verbose=True
            )


def test_ele_head_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_head(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_lord_slave_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_lord_slave(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_mat6_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_mat6(ele_id="1@0>>1", which="model", who="mat6", verbose=True)


def test_ele_methods_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_methods(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_multipoles_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_multipoles(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_orbit_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_orbit(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_param_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_photon"
        ) as tao:
            tao.ele_param(ele_id="1@0>>1", which="model", who="orbit.vec.1", verbose=True)


def test_ele_photon_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_photon"
        ) as tao:
            tao.ele_photon(ele_id="1@0>>1", which="model", who="base", verbose=True)


def test_ele_spin_taylor_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_spin"
        ) as tao:
            tao.ele_spin_taylor(ele_id="1@0>>2", which="model", verbose=True)


def test_ele_taylor_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_taylor"
        ) as tao:
            tao.ele_taylor(ele_id="1@0>>34", which="model", verbose=True)


def test_ele_twiss_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ele_twiss(ele_id="1@0>>1", which="model", verbose=True)


def test_ele_wake_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_wake"
        ) as tao:
            tao.ele_wake(ele_id="1@0>>1", which="model", who="sr_long", verbose=True)


def test_ele_wall3d_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_wall3d"
        ) as tao:
            tao.ele_wall3d(
                ele_id="1@0>>1", which="model", index="1", who="table", verbose=True
            )


def test_evaluate_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.evaluate(expression="data::cbar.11[1:10]|model", verbose=True)


def test_em_field_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.em_field(
                ele_id="1@0>>22",
                which="model",
                x="0",
                y="0",
                z="0",
                t_or_z="0",
                verbose=True,
            )


def test_enum_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.enum(enum_name="tracking_method", verbose=True)


def test_floor_plan_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.floor_plan(graph="r13.g", verbose=True)


def test_floor_orbit_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_floor_orbit",
        ) as tao:
            tao.floor_orbit(graph="r33.g", verbose=True)


def test_tao_global_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.tao_global(verbose=True)


def test_global_optimization_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.global_optimization(verbose=True)


def test_global_opti_de_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.global_opti_de(verbose=True)


def test_help_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.help(verbose=True)


def test_inum_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.inum(who="ix_universe", verbose=True)


def test_lat_calc_done_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.lat_calc_done(branch_name="1@0", verbose=True)


def test_lat_ele_list_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.lat_ele_list(branch_name="1@0", verbose=True)


def test_lat_branch_list_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.lat_branch_list(ix_uni="1", verbose=True)


def test_lat_list_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.lat_list(
                ix_uni="1",
                ix_branch="0",
                elements="Q*",
                which="model",
                who="orbit.floor.x",
                verbose=True,
            )


def test_lat_list_2(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.lat_list(
                ix_uni="1",
                ix_branch="0",
                elements="Q*",
                which="design",
                who="ele.ix_ele",
                verbose=True,
            )


def test_lat_param_units_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.lat_param_units(param_name="L", verbose=True)


def test_matrix_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.matrix(ele1_id="1@0>>q01w|design", ele2_id="q02w", verbose=True)


def test_merit_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.merit(verbose=True)


def test_orbit_at_s_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.orbit_at_s(ix_uni="1", ele="10", s_offset="0.7", which="model", verbose=True)


def test_place_buffer_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.place_buffer(verbose=True)


def test_plot_curve_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.plot_curve(curve_name="r13.g.a", verbose=True)


def test_plot_lat_layout_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.plot_lat_layout(ix_uni="1", ix_branch="0", verbose=True)


def test_plot_list_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.plot_list(r_or_g="r", verbose=True)


def test_plot_graph_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.plot_graph(graph_name="beta.g", verbose=True)


def test_plot_histogram_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.plot_histogram(curve_name="r33.g.x", verbose=True)


def test_plot_template_manage_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.plot_template_manage(
                template_location="@T1",
                template_name="beta",
                n_graph="2",
                graph_names="g1^^g2",
                verbose=True,
            )


def test_plot_curve_manage_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.plot_curve_manage(
                graph_name="beta.g", curve_index="1", curve_name="r13.g.a", verbose=True
            )


def test_plot_graph_manage_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.plot_graph_manage(
                plot_name="beta", graph_index="1", graph_name="beta.g", verbose=True
            )


def test_plot_line_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_plot_line -external_plotting",
        ) as tao:
            tao.plot_line(
                region_name="beta",
                graph_name="g",
                curve_name="a",
                x_or_y="",
                verbose=True,
            )


def test_plot_line_2(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_plot_line -external_plotting",
        ) as tao:
            tao.plot_line(
                region_name="beta",
                graph_name="g",
                curve_name="a",
                x_or_y="y",
                verbose=True,
            )


def test_plot_symbol_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_plot_line -external_plotting",
        ) as tao:
            tao.plot_symbol(
                region_name="r13",
                graph_name="g",
                curve_name="a",
                x_or_y="",
                verbose=True,
            )


def test_plot_symbol_2(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_plot_line -external_plotting",
        ) as tao:
            tao.plot_symbol(
                region_name="r13",
                graph_name="g",
                curve_name="a",
                x_or_y="y",
                verbose=True,
            )


def test_plot_transfer_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.plot_transfer(from_plot="r13", to_plot="r23", verbose=True)


def test_plot1_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.plot1(name="beta", verbose=True)


def test_ptc_com_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ptc_com(verbose=True)


def test_ring_general_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.ring_general(ix_uni="1", ix_branch="0", which="model", verbose=True)


def test_shape_list_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.shape_list(who="floor_plan", verbose=True)


def test_shape_manage_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.shape_manage(who="floor_plan", index="1", add_or_delete="add", verbose=True)


def test_shape_pattern_list_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_shape"
        ) as tao:
            tao.shape_pattern_list(ix_pattern="", verbose=True)


def test_shape_pattern_manage_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_shape"
        ) as tao:
            tao.shape_pattern_manage(
                ix_pattern="1", pat_name="new_pat", pat_line_width="1", verbose=True
            )


def test_shape_pattern_point_manage_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_shape"
        ) as tao:
            tao.shape_pattern_point_manage(
                ix_pattern="1", ix_point="1", s="0", x="0", verbose=True
            )


def test_shape_set_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.shape_set(
                who="floor_plan",
                shape_index="1",
                ele_name="Q1",
                shape="circle",
                color="",
                shape_size="",
                type_label="",
                shape_draw="",
                multi_shape="",
                line_width="",
                verbose=True,
            )


def test_show_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.show(line="-python", verbose=True)


def test_space_charge_com_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.space_charge_com(verbose=True)


def test_species_to_int_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.species_to_int(species_str="electron", verbose=True)


def test_species_to_str_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.species_to_str(species_int="-1", verbose=True)


def test_spin_invariant_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.spin_invariant(
                who="l0", ix_uni="1", ix_branch="0", which="model", verbose=True
            )


def test_spin_polarization_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.spin_polarization(ix_uni="1", ix_branch="0", which="model", verbose=True)


def test_spin_resonance_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.spin_resonance(ix_uni="1", ix_branch="0", which="model", verbose=True)


def test_super_universe_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.super_universe(verbose=True)


def test_taylor_map_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.taylor_map(ele1_id="1@0>>q01w|design", ele2_id="q02w", order="1", verbose=True)


def test_twiss_at_s_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.twiss_at_s(ix_uni="1", ele="10", s_offset="0.7", which="model", verbose=True)


def test_universe_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.universe(ix_uni="1", verbose=True)


def test_var_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.var(var="quad[1]", slaves="", verbose=True)


def test_var_2(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.var(var="quad[1]", slaves="slaves", verbose=True)


def test_var_create_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls,
            "-init $ACC_ROOT_DIR/regression_tests/python_test/tao.init_optics_matching",
        ) as tao:
            tao.var_create(
                var_name="quad[1]",
                ele_name="Q1",
                attribute="L",
                universes="1",
                weight="0.001",
                step="0.001",
                low_lim="-10",
                high_lim="10",
                merit_type="",
                good_user="T",
                key_bound="T",
                key_delta="0.01",
                verbose=True,
            )


def test_var_general_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.var_general(verbose=True)


def test_var_v_array_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.var_v_array(v1_var="quad_k1", verbose=True)


def test_var_v1_array_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.var_v1_array(v1_var="quad_k1", verbose=True)


def test_var_v1_create_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.var_v1_create(v1_name="quad_k1", n_var_min="0", n_var_max="45", verbose=True)


def test_var_v1_destroy_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.var_v1_destroy(v1_datum="quad_k1", verbose=True)


def test_wave_1(caplog, tao_cls):
    with ensure_successful_parsing(caplog):
        with new_tao(
            tao_cls, "-init $ACC_ROOT_DIR/regression_tests/python_test/cesr/tao.init"
        ) as tao:
            tao.wave(who="params", verbose=True)
