ATLAS Offline Software
Loading...
Searching...
No Matches
test_oracle Namespace Reference

Functions

 test_fetch_runs ()

Function Documentation

◆ test_fetch_runs()

test_oracle.test_fetch_runs ( )

Definition at line 5 of file test_oracle.py.

5def test_fetch_runs():
6 from DQUtils import oracle
7 from DQUtils.sugar import RunLumi, RANGEIOV_VAL
8
9 # we just want to check this doesn't fail
10 oracle.fetch_recent_runs()
11
12 # these we check for consistency
13 lastruns = set(oracle.fetch_last_n_atlas_runs(10))
14 assert len(lastruns) == 10
15 minrun, maxrun = min(lastruns), max(lastruns)
16 selectedruns = {_[1] for _ in oracle.fetch_runs_since(minrun-1)}
17 assert selectedruns == lastruns, f'{selectedruns}, {lastruns}'
18 selectedruns = set(oracle.atlas_runs_between(minrun, maxrun))
19 assert lastruns == selectedruns
20 fakeiovs = [RANGEIOV_VAL(RunLumi(_, 1), RunLumi(_, 0xffffffff))
21 for _ in range(minrun, maxrun+1)]
22 assert oracle.filter_atlas_runs(fakeiovs).runs == lastruns
23
#define min(a, b)
Definition cfImp.cxx:40
#define max(a, b)
Definition cfImp.cxx:41
STL class.