ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.TestCases.DQUTestCase Class Reference
Inheritance diagram for python.TestCases.DQUTestCase:
Collaboration diagram for python.TestCases.DQUTestCase:

Public Member Functions

def setUp (self)
 
def test_01_Merging (self)
 
def test02_WebDisplay (self)
 
def test_03_WebDisplay (self)
 
def tearDown (self)
 

Public Attributes

 outfile
 

Detailed Description

Definition at line 11 of file DataQualityUtils/python/TestCases.py.

Member Function Documentation

◆ setUp()

def python.TestCases.DQUTestCase.setUp (   self)

Definition at line 12 of file DataQualityUtils/python/TestCases.py.

12  def setUp(self):
13  self.outfile = ''
14 

◆ tearDown()

def python.TestCases.DQUTestCase.tearDown (   self)

Definition at line 59 of file DataQualityUtils/python/TestCases.py.

59  def tearDown(self):
60  try:
61  if self.outfile != '':
62  os.unlink(self.outfile)
63  except OSError:
64  pass
65 

◆ test02_WebDisplay()

def python.TestCases.DQUTestCase.test02_WebDisplay (   self)
Test that a terminal web display job works

Definition at line 27 of file DataQualityUtils/python/TestCases.py.

27  def test02_WebDisplay(self):
28  '''Test that a terminal web display job works'''
29  print()
30  print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
31  print('Running web display test ....')
32  print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
33  outdir = os.environ.get('TMPDIR', '.')
34  infile = os.path.join(TESTING_DIR, 'data09_calophys.00128005.physics_CosmicMuons.root')
35  rv = os.system('cd %s ; DQWebDisplay.py %s TestDisplay 123' % (outdir, infile))
36  self.assertTrue(rv==0, "DQWebDisplay.py return code is nonzero")
37 

◆ test_01_Merging()

def python.TestCases.DQUTestCase.test_01_Merging (   self)
Test that histogram merging + postprocessing works

Definition at line 15 of file DataQualityUtils/python/TestCases.py.

15  def test_01_Merging(self):
16  '''Test that histogram merging + postprocessing works'''
17  print()
18  print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
19  print('Running merge test ....')
20  print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
21  outdir = os.environ.get('TMPDIR', '.')
22  inlist = os.path.join(TESTING_DIR, 'test_merging')
23  self.outfile = os.path.join(outdir, 'data09_calophys.00128005.physics_CosmicMuons.root')
24  rv = os.system('cd %s ; DQHistogramMerge.py %s %s True' % (outdir, inlist, self.outfile))
25  self.assertTrue(rv==0, "DQHistogramMerge.py return code is nonzero")
26 

◆ test_03_WebDisplay()

def python.TestCases.DQUTestCase.test_03_WebDisplay (   self)
Test that a terminal web display job works in temporary accumulation mode

Definition at line 38 of file DataQualityUtils/python/TestCases.py.

38  def test_03_WebDisplay(self):
39  '''Test that a terminal web display job works in temporary accumulation mode'''
40  print()
41  print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
42  print('Running intermediate web display test ....')
43  print('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
44  outdir = os.environ.get('TMPDIR', '.')
45  infile = os.path.join(TESTING_DIR, 'data09_calophys.00128005.physics_CosmicMuons.root')
46  from DataQualityConfigurations.TestDisplay import dqconfig
47  cachedir = dqconfig.histogramCache
48  if cachedir == '':
49  self.fail('Unable to test intermediate web displays; no histogramCache directory set')
50  if not os.access(cachedir, os.W_OK):
51  print("No write permissions for cache dir %s; skipping test" % cachedir)
52  return
53  cachefilename = os.path.basename(infile).rsplit('.',1)[-2] + '.CACHE_1'
54  shutil.copy(infile, os.path.join(cachedir, cachefilename))
55 
56  rv = os.system('cd %s ; DQWebDisplay.py %s TestDisplay 123 True' % (outdir, infile))
57  self.assertTrue(rv==0, "DQWebDisplay.py return code is nonzero")
58 

Member Data Documentation

◆ outfile

python.TestCases.DQUTestCase.outfile

Definition at line 13 of file DataQualityUtils/python/TestCases.py.


The documentation for this class was generated from the following file:
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25