~maddevelopers/mg5amcnlo/python_syscalc

« back to all changes in this revision

Viewing changes to tests/acceptance_tests/test_cmd_madevent.py

  • Committer: olivier Mattelaer
  • Date: 2016-08-11 20:49:35 UTC
  • Revision ID: olivier.mattelaer@uclouvain.be-20160811204935-gsp1ac36n2soyy4j
fixing tests

Show diffs side-by-side

added added

removed removed

Lines of Context:
116
116
        interface.exec_cmd('set madanalysis_path %s --no_save' % pjoin(MG5DIR, 'MadAnalysis'))
117
117
        interface.onecmd('output madevent %s -f' % self.run_dir)            
118
118
        
119
 
        if not os.path.exists(pjoin(interface.options['syscalc_path'],'sys_calc')):
120
 
            print "install SysCalc"
121
 
            interface.onecmd('install SysCalc')
 
119
        if os.path.exists(pjoin(interface.options['syscalc_path'],'sys_calc')):
 
120
            shutil.rmtree(interface.options['syscalc_path'])
 
121
            #print "install SysCalc"
 
122
            #interface.onecmd('install SysCalc')
122
123
        
123
124
        
124
125
        self.cmd_line = MECmd.MadEventCmdShell(me_dir=self.run_dir)
398
399
            # check that the html has the information
399
400
            self.assertTrue('syst' in data[0].parton)
400
401
            # check that the code was runned correctly
401
 
            fsock = open('%s/Events/%s/%s_parton_syscalc.log' % \
402
 
                  (self.run_dir, data[0]['run_name'], data[0]['tag']),'r')
 
402
            fsock = open('%s/Events/%s/parton_systematics.log' % \
 
403
                  (self.run_dir, data[0]['run_name']),'r')
403
404
            text = fsock.read()
404
 
            self.assertTrue(text.count('cross-section') >= 3)
 
405
            self.assertTrue(text.count('dynamical scheme') >= 3)
405
406
        
406
407
                
407
408
    def check_pythia_output(self, run_name='run_01', syst=False):
411
412
        self.assertTrue('lhe' in data[0].pythia)
412
413
        self.assertTrue('log' in data[0].pythia)
413
414
 
414
 
        if syst:
415
 
            # check that the html has the information
416
 
            self.assertTrue('rwt' in data[0].pythia)
 
415
#        if syst:
 
416
#            # check that the html has the information
 
417
#            self.assertTrue('rwt' in data[0].pythia)
417
418
 
418
419
    def check_matched_plot(self, run_name='run_01', mintime=None, tag='fermi'):
419
420
        """ """