◆ do_imports()
def python.TestCases.DQCTestCase.do_imports |
( |
|
self, |
|
|
|
verbose = False |
|
) |
| |
Definition at line 12 of file DataQualityConfigurations/python/TestCases.py.
12 def do_imports(self, verbose=False):
13 import DataQualityConfigurations
14 for i
in DataQualityConfigurations.__all__:
15 if verbose:
print (
'Importing', i)
16 modname =
'DataQualityConfigurations.%s' % i
18 self.modlist.
append(sys.modules[modname])
◆ setUp()
def python.TestCases.DQCTestCase.setUp |
( |
|
self | ) |
|
◆ test_01_ConfigsReadable()
def python.TestCases.DQCTestCase.test_01_ConfigsReadable |
( |
|
self | ) |
|
Test that we can read the python config files ok
Definition at line 20 of file DataQualityConfigurations/python/TestCases.py.
20 def test_01_ConfigsReadable(self):
21 '''Test that we can read the python config files ok'''
22 self.do_imports(verbose=
True)
23 self.assert_(len(self.modlist) > 0,
'Should have more than one config module')
◆ test_02_ConfigsHaveConfigs()
def python.TestCases.DQCTestCase.test_02_ConfigsHaveConfigs |
( |
|
self | ) |
|
◆ test_03_ConfigsPointAtGoodFiles()
def python.TestCases.DQCTestCase.test_03_ConfigsPointAtGoodFiles |
( |
|
self | ) |
|
Definition at line 30 of file DataQualityConfigurations/python/TestCases.py.
30 def test_03_ConfigsPointAtGoodFiles(self):
32 for mod
in self.modlist:
33 for f
in (
'hcfg',
'hcfg_min10',
'hcfg_min30'):
34 mf = getattr(mod.dqconfig, f)
36 self.failUnless(os.access(mf, os.R_OK),
37 'File %s not readable in configuration %s' % (mf, mod.__name__) )
38 self.failUnless(
'/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/' in mf,
39 'Invalid location %s for a production hcfg file in %s' % (mf, mod.__name__) )
◆ test_04_ModuleHandling()
def python.TestCases.DQCTestCase.test_04_ModuleHandling |
( |
|
self | ) |
|
Definition at line 41 of file DataQualityConfigurations/python/TestCases.py.
41 def test_04_ModuleHandling(self):
43 from DataQualityConfigurations
import getmodule
45 for mod
in self.modlist:
46 self.assertTrue(
getmodule(mod.__name__.replace(
'DataQualityConfigurations.',
'')))
49 for mname
in (
'data15_hi',
71 self.assertRaises(ValueError, getmodule,
'NonExistentPtag')
◆ modlist
python.TestCases.DQCTestCase.modlist |
The documentation for this class was generated from the following file: