~madteam/mg5amcnlo/series2.0

« back to all changes in this revision

Viewing changes to tests/parallel_tests/test_cmd_amcatnlo.py

  • Committer: olivier-mattelaer
  • Date: 2020-08-21 09:16:56 UTC
  • mfrom: (284.2.24 python3)
  • Revision ID: olivier-mattelaer-20200821091656-iizux2mj94tkssuo
pass to 2.8.0 (and move to python3 branch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
13
13
#
14
14
################################################################################
15
15
from __future__ import division
 
16
from __future__ import absolute_import
16
17
import subprocess
17
18
import unittest
18
19
import os
23
24
import tempfile
24
25
import time
25
26
import math
26
 
from cStringIO import StringIO
 
27
from io import StringIO
 
28
#from cStringIO import StringIO
27
29
 
28
30
logger = logging.getLogger('test_cmd')
29
31
 
85
87
 
86
88
        try:
87
89
            shutil.rmtree(self.path)
88
 
        except Exception, error:
 
90
        except Exception as error:
89
91
            pass
90
92
 
91
93
        interface = MGCmd.MasterCmd()
297
299
        """tests if the p p > go go (in the mssm) process works"""
298
300
        start= time.time()
299
301
        self.generate(['p p > go go [real=QCD]'], 'MSSM_SLHA2')
300
 
        misc.sprint( 'ppgg[real=QCD] generated in', time.time()-start)
301
302
 
302
303
 
303
304
        ####NLO
312
313
 
313
314
        start = time.time()
314
315
        self.do('launch NLO -f')
315
 
        misc.sprint( 'launch in NLO in ', time.time()-start)
316
316
        # test the plot file exists
317
317
        self.assertTrue(os.path.exists('%s/Events/run_01/MADatNLO.HwU' % self.path))
318
318
        self.assertTrue(os.path.exists('%s/Events/run_01/summary.txt' % self.path))
330
330
 
331
331
        start = time.time()
332
332
        self.do('launch aMC@NLO -fp')
333
 
        misc.sprint( 'launch in aMC@NLO in ', time.time()-start)
334
333
        # test the lhe event file exists
335
334
        self.assertTrue(os.path.exists('%s/Events/run_02/events.lhe.gz' % self.path))
336
335
        self.assertTrue(os.path.exists('%s/Events/run_02/summary.txt' % self.path))