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

fix tests/test_cal_tools.py::test_raise_initialize_from_db

parent b4f80702
No related branches found
No related tags found
1 merge request!774[AGIPD][CORRECT] Use calcat_interface and remove precorrection notebook
...@@ -1486,7 +1486,7 @@ class AgipdCorrections: ...@@ -1486,7 +1486,7 @@ class AgipdCorrections:
missing_gain_constants = set( missing_gain_constants = set(
c for c in gain_constants if c not in metadata[karabo_da].keys()) c for c in gain_constants if c not in metadata[karabo_da].keys())
if missing_dark_constants: if missing_dark_constants:
warning( raise KeyError(
f"Dark constants {missing_dark_constants} are not available" f"Dark constants {missing_dark_constants} are not available"
f" for correction. Module: {karabo_da}") f" for correction. Module: {karabo_da}")
if missing_gain_constants: if missing_gain_constants:
......
...@@ -10,7 +10,6 @@ from extra_data import open_run ...@@ -10,7 +10,6 @@ from extra_data import open_run
from iCalibrationDB import Conditions, ConstantMetaData, Constants from iCalibrationDB import Conditions, ConstantMetaData, Constants
from cal_tools.agipdlib import AgipdCorrections, CellRange from cal_tools.agipdlib import AgipdCorrections, CellRange
from cal_tools.calcat_interface import CalCatError
from cal_tools.plotting import show_processed_modules from cal_tools.plotting import show_processed_modules
from cal_tools.tools import ( from cal_tools.tools import (
creation_date_file_metadata, creation_date_file_metadata,
...@@ -423,8 +422,7 @@ def test_raise_initialize_from_db(): ...@@ -423,8 +422,7 @@ def test_raise_initialize_from_db():
modules=[0], modules=[0],
constant_shape=(3, MEM_CELLS, 512, 128)) constant_shape=(3, MEM_CELLS, 512, 128))
# CalCatError: calibration_constant_version not found ! with pytest.raises(KeyError):
with pytest.raises(CalCatError):
agipd_corr.initialize_from_db( agipd_corr.initialize_from_db(
karabo_id="TEST_DET_CAL_CI-1", karabo_id="TEST_DET_CAL_CI-1",
karabo_da="TEST_DET_CAL_DA1", karabo_da="TEST_DET_CAL_DA1",
......
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