Skip to content
Snippets Groups Projects
Commit d005d9e7 authored by Karim Ahmed's avatar Karim Ahmed
Browse files

apply test only for correct calibrations

parent 2d34e7d3
No related branches found
No related tags found
1 merge request!942[Tests] Validate metadata for retrieved constants before validating the corrected files
This commit is part of merge request !942. Comments created here will be created in the context of that merge request.
...@@ -375,14 +375,15 @@ def test_xfel_calibrate( ...@@ -375,14 +375,15 @@ def test_xfel_calibrate(
if time_counter > time_to_wait: if time_counter > time_to_wait:
assert False, f"{test_key} failure, report doesn't exists." assert False, f"{test_key} failure, report doesn't exists."
LOGGER.info("Report found.") LOGGER.info("Report found.")
# For corrections validate same calibration constants were retrieved.
if cal_type.lower() != "correct":
metadata_file = f"calibration_metadata_{cal_conf['karabo-id']}" # For corrections validate calibration constants
assert compare_metadata_ccvs( metadata_file = f"calibration_metadata_{cal_conf['karabo-id']}"
out_folder / metadata_file, assert compare_metadata_ccvs(
reference_folder / metadata_file, out_folder / metadata_file,
"retrieved-constants", reference_folder / metadata_file,
), "Found difference in the metadata for the retrieved Constants." "retrieved-constants",
), "Found difference in the metadata for the retrieved Constants."
# Stop tests at this point, if desired. # Stop tests at this point, if desired.
if not skip_numerical_validation: if not skip_numerical_validation:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment