ABS_ROOT = abspath(join(dirname(__file__), "..", "..")) REGR_DIR = join("tests", "regression") TBTS = join("tests", "inputs", "tbt_files") MODELS = join("tests", "inputs", "models") OPTICS = join("tests", "inputs", "optics_files") HARM_FILES = join("tests", "inputs", "harmonic_results") TEST_CASES_HOLE_IN_ONE = (regression.TestCase( name="hole_in_one_test_flat_3dkick", script=join("hole_in_one", "hole_in_one.py"), arguments=("--file={file} --model={model} --output={output} clean " "harpy --tunex 0.27 --tuney 0.322 --tunez 4.5e-4 " "--nattunex 0.28 --nattuney 0.31".format( file=join(TBTS, "flat_beam1_3d.sdds"), model=join(MODELS, "flat_beam1", "twiss.dat"), output=join(REGR_DIR, "_out_hole_in_one_test_flat_3dkick"))), output=join(REGR_DIR, "_out_hole_in_one_test_flat_3dkick"), test_function=lambda d1, d2: compare_utils.compare_dirs( d1, d2, ignore=[r".*\.log"]), pre_hook=lambda dir: os.makedirs( join(dir, REGR_DIR, "_out_hole_in_one_test_flat_3dkick")), ), ) TEST_CASES_GETLLM = (regression.TestCase( name="getllm_test_flat_disp", script=join("GetLLM", "GetLLM.py"), arguments= ("--accel=LHCB1 " "--model={model} " "--files={files_dir}/on_mom_file1.sdds,{files_dir}/on_mom_file2.sdds,{files_dir}/neg_mom_file1.sdds,{files_dir}/pos_mom_file1.sdds "
help="Keep output files if test fails.", dest="keepfiles", action="store_true", ) return parser.parse_args() TEST_CASES_HOLE_IN_ONE = (regression.TestCase( name="hole_in_one_test_flat_3dkick", script="hole_in_one.py", arguments=("--file={file} --model={model} --output={output} clean " "harpy --tunex 0.27 --tuney 0.322 --tunez 4.5e-4 " "--nattunex 0.28 --nattuney 0.31 --tolerance 0.005".format( file=join(TBTS, "flat_beam1_3d.sdds"), model=join(MODELS, "flat_beam1", "twiss.dat"), output=join(REGR_DIR, "_out_hole_in_one_test_flat_3dkick"))), output=join(REGR_DIR, "_out_hole_in_one_test_flat_3dkick"), test_function=lambda d1, d2: compare_utils.compare_dirs( d1, d2, ignore=[r".*\.log"]), pre_hook=lambda dir: os.makedirs( join(dir, REGR_DIR, "_out_hole_in_one_test_flat_3dkick")), ), ) TEST_CASES_GETLLM = (regression.TestCase( name="getllm_test_flat_disp", script=join("GetLLM", "GetLLM.py"), arguments= ("--accel=LHCB1 " "--model={model} " "--files={files_dir}/on_mom_file1.sdds,{files_dir}/on_mom_file2.sdds,{files_dir}/neg_mom_file1.sdds,{files_dir}/pos_mom_file1.sdds "