3 from __future__
import print_function
13 import DataQualityConfigurations
14 for i
in DataQualityConfigurations.__all__:
15 if verbose:
print (
'Importing', i)
16 modname =
'DataQualityConfigurations.%s' % i
21 '''Test that we can read the python config files ok'''
23 self.assert_(len(self.
modlist) > 0,
'Should have more than one config module')
28 self.assert_(mod.dqconfig)
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__) )
43 from DataQualityConfigurations
import getmodule
46 self.assertTrue(
getmodule(mod.__name__.replace(
'DataQualityConfigurations.',
'')))
49 for mname
in (
'data15_hi',
71 self.assertRaises(ValueError, getmodule,
'NonExistentPtag')
74 suite = unittest.TestLoader().loadTestsFromTestCase(DQCTestCase)
77 if __name__ ==
'__main__':