All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
bug_35913_test.py
Go to the documentation of this file.
1 # -*- coding: utf-8 -*-
2 import BaseTest
3 from BaseTest import *
4 
5 class Test(BaseTest):
6 
7  def __init__(self):
8  BaseTest.__init__(self)
9  self.name = os.path.basename(__file__)[:-5]
10  self.program="gaudirun.py"
11  self.args=["-v", "--dry-run"]
12  self.options="""
13 from Gaudi.Configuration import *
14 from Configurables import Gaudi__Examples__HistoProps
15 h = Gaudi__Examples__HistoProps()
16 h.Histo1 = ('MyHistogram',-1,1,100)
17 h.Histo1 = ('MyHistogram',-5,5,500)"""
18 
19  def validator(self,stdout,stderr, result, causes, reference, error_reference):
20  conf_dict = eval('\n'.join(stdout.splitlines()))
21  expected = {'Gaudi::Examples::HistoProps':
22  {'Histo1': ('MyHistogram', -5, 5, 500)}}
23 
24  if conf_dict != expected:
25  causes.append("configuration result")
26  from pprint import PrettyPrinter
27  pp = PrettyPrinter()
28  result["GaudiTest.configuration.expected"] = result.Quote(pp.pformat(expected))
29  result["GaudiTest.configuration.found"] = result.Quote(pp.pformat(conf_dict))