Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pycalibration
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
calibration
pycalibration
Commits
9d102f44
Commit
9d102f44
authored
1 year ago
by
Karim Ahmed
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tests/test_gotthard2lib.py
+19
-20
19 additions, 20 deletions
tests/test_gotthard2lib.py
with
19 additions
and
20 deletions
tests/test_gotthard2lib.py
+
19
−
20
View file @
9d102f44
...
...
@@ -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)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment