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 12 of file DataQualityUtils/python/TestCases.py.

Member Function Documentation

◆ setUp()

def python.TestCases.DQUTestCase.setUp (   self)

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

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

◆ tearDown()

def python.TestCases.DQUTestCase.tearDown (   self)

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

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

◆ test02_WebDisplay()

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

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

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

◆ test_01_Merging()

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

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

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

◆ 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 39 of file DataQualityUtils/python/TestCases.py.

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

Member Data Documentation

◆ outfile

python.TestCases.DQUTestCase.outfile

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


The documentation for this class was generated from the following file:
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28