◆ do_imports()
def python.TestCases.DQCTestCase.do_imports |
( |
|
self, |
|
|
|
verbose = False |
|
) |
| |
Definition at line 11 of file DataQualityConfigurations/python/TestCases.py.
11 def do_imports(self, verbose=False):
12 import DataQualityConfigurations
13 for i
in DataQualityConfigurations.__all__:
14 if verbose:
print (
'Importing', i)
15 modname =
'DataQualityConfigurations.%s' % i
17 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 19 of file DataQualityConfigurations/python/TestCases.py.
19 def test_01_ConfigsReadable(self):
20 '''Test that we can read the python config files ok'''
21 self.do_imports(verbose=
True)
22 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 29 of file DataQualityConfigurations/python/TestCases.py.
29 def test_03_ConfigsPointAtGoodFiles(self):
31 for mod
in self.modlist:
32 for f
in (
'hcfg',
'hcfg_min10',
'hcfg_min30'):
33 mf = getattr(mod.dqconfig, f)
35 self.failUnless(os.access(mf, os.R_OK),
36 'File %s not readable in configuration %s' % (mf, mod.__name__) )
37 self.failUnless(
'/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/' in mf,
38 '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 40 of file DataQualityConfigurations/python/TestCases.py.
40 def test_04_ModuleHandling(self):
42 from DataQualityConfigurations
import getmodule
44 for mod
in self.modlist:
45 self.assertTrue(
getmodule(mod.__name__.replace(
'DataQualityConfigurations.',
'')))
48 for mname
in (
'data15_hi',
70 self.assertRaises(ValueError, getmodule,
'NonExistentPtag')
◆ modlist
python.TestCases.DQCTestCase.modlist |
The documentation for this class was generated from the following file: