def _verifyExperimentProfile(self, env): profile_type = env.var('experiment_profile') profile_inst = env.var('experiment_profile_inst') env.logger.info('Experiment profile: %s' % profile_type) exp_profile = importComponent(profile_type) profile = AppProfile(exp_profile, profile_inst) env.addVar('profile', profile) env.logger.info('Configured experiment profile (%d elements found)' % (len(profile.keys())))
def test_init2(self): # profile definition specifies only the required components p = AppProfile(self.def_p1, self.p2) self.assertEqual(self.p1, p._cfg) # extra profile components are silently ignored self.assertNotIn('key6', p.keys())
def test_init1(self): p = AppProfile(self.def_p1, self.p1) self.assertEqual(self.p1, p._cfg) self.assertItemsEqual(self.p1.keys(), p.keys()) for pk in self.p1.keys(): self.assertEqual(self.p1[pk], p[pk])