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

comment out tests for now for the lack of permissions

parent e63f7702
No related branches found
No related tags found
1 merge request!958[Gotthard2][Dark] Sort dark runs
......@@ -2,26 +2,25 @@ import pytest
from cal_tools.gotthard2.gotthard2lib import sort_dark_runs_by_gain
# TODO: Uncomment when test proposal have GH2 dark runs.
# xcaltst has no permission to access other than CALLAB RAW data.
# @pytest.mark.requires_gpfs
# def test_sort_dark_runs_by_gain():
# raw_folder = "/gpfs/exfel/exp/FXE/202231/p900298/raw"
# ctrl_src = "FXE_XAD_G2XES/DET/CONTROL"
# runs = [9, 8, 7]
# sorted_runs = sort_dark_runs_by_gain(raw_folder, runs, ctrl_src)
# assert sorted_runs == [7, 8, 9]
@pytest.mark.requires_gpfs
def test_sort_dark_runs_by_gain():
# TODO: update used raw data to test data when available.
raw_folder = "/gpfs/exfel/exp/FXE/202231/p900298/raw"
ctrl_src = "FXE_XAD_G2XES/DET/CONTROL"
runs = [9, 8, 7]
sorted_runs = sort_dark_runs_by_gain(raw_folder, runs, ctrl_src)
assert sorted_runs == [7, 8, 9]
# @pytest.mark.requires_gpfs
# def test_raise_sort_dark_runs_by_gain():
# raw_folder = "/gpfs/exfel/exp/SA1/202331/p900384/raw"
# ctrl_src = "SA1_XTD9_HIREX/DET/GOTTHARD2_CTRL"
# runs = [60, 61, 62, 63]
# with pytest.raises(AssertionError): # More than 3 runs
# sort_dark_runs_by_gain(raw_folder, runs, ctrl_src)
@pytest.mark.requires_gpfs
def test_raise_sort_dark_runs_by_gain():
# TODO: update used raw data to test data when available.
raw_folder = "/gpfs/exfel/exp/SA1/202331/p900384/raw"
ctrl_src = "SA1_XTD9_HIREX/DET/GOTTHARD2_CTRL"
runs = [60, 61, 62, 63]
with pytest.raises(AssertionError) as err:
sort_dark_runs_by_gain(raw_folder, runs, ctrl_src)
runs = [89, 61, 63] # dynamicgain, dynamicgain, fixgain2
with pytest.raises(ValueError) as err:
sort_dark_runs_by_gain(raw_folder, runs, ctrl_src)
\ No newline at end of file
# runs = [89, 61, 63] # dynamicgain, dynamicgain, fixgain2
# with pytest.raises(ValueError): # Two high gain runs
# sort_dark_runs_by_gain(raw_folder, runs, ctrl_src)
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