Skip to content

Commit 7101d4e

Browse files
committed
[xroofit] set batch mode in xroofit_python.py test
Otherwise test tries to create interactive canvas (cherry picked from commit 2744740)
1 parent 53f3f0a commit 7101d4e

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

roofit/xroofit/test/xroofit_python.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import ROOT
44

5+
ROOT.gROOT.SetBatch(True)
56

67
class XRooFitTests(unittest.TestCase):
78

@@ -45,11 +46,11 @@ def test_oneChannelLimit(self):
4546
# add the obsData to the channel
4647
sr.datasets().Add(obsData)
4748

48-
# example of accessing expected yields in bins with propagated errors
49+
# example of accessing expected yields in bins with propagated errors
4950
w.poi()["mu"].setVal(0)
5051
self.assertAlmostEqual(w["pdfs/simPdf/SR"].GetContent(), bkg.Integral())
5152
self.assertAlmostEqual(w["pdfs/simPdf/SR"].GetError(), abs(bkg_vary1.Integral()-bkg.Integral()) )
52-
# accessing a single sample expected yield
53+
# accessing a single sample expected yield
5354
w.poi()["mu"].setVal(0.5)
5455
self.assertAlmostEqual(w["pdfs/simPdf/SR/sig"].GetContent(), sig.Integral()*w.poi()["mu"].getVal())
5556
self.assertAlmostEqual(w["pdfs/simPdf/SR/sig"].GetError(), 0.) # no uncert was added to the signal

0 commit comments

Comments
 (0)