From 578b83fbc2f76f6f20831eb5d01005ad44b06127 Mon Sep 17 00:00:00 2001 From: Sergey Linev Date: Fri, 5 Jun 2026 14:33:32 +0200 Subject: [PATCH] [xroofit] set batch mode in xroofit_python.py test Otherwise test tries to create interactive canvas (cherry picked from commit 2744740efc9a821c9c4a12900fe0ea6b0ac23f8b) --- roofit/xroofit/test/xroofit_python.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/roofit/xroofit/test/xroofit_python.py b/roofit/xroofit/test/xroofit_python.py index 475664762bec6..2ae51821f73ef 100644 --- a/roofit/xroofit/test/xroofit_python.py +++ b/roofit/xroofit/test/xroofit_python.py @@ -2,6 +2,7 @@ import ROOT +ROOT.gROOT.SetBatch(True) class XRooFitTests(unittest.TestCase): @@ -45,11 +46,11 @@ def test_oneChannelLimit(self): # add the obsData to the channel sr.datasets().Add(obsData) - # example of accessing expected yields in bins with propagated errors + # example of accessing expected yields in bins with propagated errors w.poi()["mu"].setVal(0) self.assertAlmostEqual(w["pdfs/simPdf/SR"].GetContent(), bkg.Integral()) self.assertAlmostEqual(w["pdfs/simPdf/SR"].GetError(), abs(bkg_vary1.Integral()-bkg.Integral()) ) - # accessing a single sample expected yield + # accessing a single sample expected yield w.poi()["mu"].setVal(0.5) self.assertAlmostEqual(w["pdfs/simPdf/SR/sig"].GetContent(), sig.Integral()*w.poi()["mu"].getVal()) self.assertAlmostEqual(w["pdfs/simPdf/SR/sig"].GetError(), 0.) # no uncert was added to the signal