ATLAS Offline Software
test_read.py
Go to the documentation of this file.
1 #! /usr/bin/env python
2 
3 # Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
4 
5 from DQUtils import fetch_iovs
6 from DQUtils.tests import invariant
7 
8 @invariant("359918-DetStatusDEFECTS-pro22-04")
9 def test_read():
10  """
11  Check if retrieving the Code and Comment field from DetStatusSHIFTOFL-pass1-analysis-2010B changed
12 
13  Reads some data from the database which is expected not to change.
14  A problem with this could either indicate a broken API, or a changed database
15  """
16  tag = "DetStatusDEFECTS-pro22-04"
17  result = fetch_iovs("DEFECTS", what=["present", "recoverable", "user"], tag=tag, runs=359918)
18  return list(result)
19 
20 @invariant("359918-blobs")
21 def test_fetch():
22  fetch_iovs("DEFECTS", runs=359918)
23  fetch_iovs("COOLOFL_DCS::/LHC/DCS/FILLSTATE", runs=359918)
24  fetch_iovs("COOLOFL_DCS/CONDBR2::/LHC/DCS/FILLSTATE", runs=359918)
25  iovs=fetch_iovs("COOLONL_TRIGGER::/TRIGGER/LUMI/OnlPrefLumi", runs=359918)
26  assert len(iovs) == 729, 'correct number of iovs retrieved'
27  return iovs[:10]
28 
29 if __name__ == '__main__':
30  import sys
31  test_read()
32  test_fetch()
test_read.test_fetch
def test_fetch()
Definition: test_read.py:21
python.db.fetch_iovs
def fetch_iovs(folder_name, since=None, until=None, channels=None, tag="", what="all", max_records=-1, with_channel=True, loud=False, database=None, convert_time=False, named_channels=False, selection=None, runs=None, with_time=False, unicode_strings=False)
Definition: DQUtils/python/db.py:67
test_read
Definition: test_read.py:1
RCU::Check::invariant
@ invariant
invariant violation
Definition: Assert.h:73
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
test_read.test_read
def test_read()
Definition: test_read.py:9