From b0341d4a601d8c735457608c2ea0f84f9a1f8780 Mon Sep 17 00:00:00 2001 From: Jürgen Knödlseder Date: Thu, 26 Oct 2017 18:43:19 +0200 Subject: [PATCH] Add "onsrc" parameter for cspull tests --- test/test_cspull.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/test_cspull.py b/test/test_cspull.py index fe7d87a..baa999b 100755 --- a/test/test_cspull.py +++ b/test/test_cspull.py @@ -33,7 +33,7 @@ class Test(test): This test class makes unit tests for the cspull script by using it from the command line and from Python. """ - + # Constructor def __init__(self): """ @@ -74,7 +74,7 @@ class Test(test): cspull = self._script('cspull') # Setup cspull command - cmd = cspull+' inmodel="'+self._model+'"'+ \ + cmd = cspull+' inmodel="'+self._model+'" onsrc=""'+ \ ' outfile="cspull_cmd1.dat"'+ \ ' ntrials=2'+ \ ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ @@ -95,7 +95,7 @@ class Test(test): self._check_pull_file('cspull_cmd1.dat') # Setup cspull command - cmd = cspull+' inmodel="model_that_does_not_exist.xml"'+ \ + cmd = cspull+' inmodel="model_that_does_not_exist.xml" onsrc=""'+ \ ' outfile="cspull_cmd1.dat"'+ \ ' ntrials=2'+ \ ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ @@ -122,6 +122,7 @@ class Test(test): # Set-up unbinned cspull pull = cscripts.cspull() pull['inmodel'] = self._model + pull['onsrc'] = '' pull['outfile'] = 'cspull_py1.dat' pull['ntrials'] = 2 pull['caldb'] = self._caldb @@ -149,6 +150,7 @@ class Test(test): # Set-up binned cspull pull = cscripts.cspull() pull['inmodel'] = self._model + pull['onsrc'] = '' pull['outfile'] = 'cspull_py2.dat' pull['ntrials'] = 1 pull['caldb'] = self._caldb @@ -178,6 +180,7 @@ class Test(test): # Set-up cspull from event list pull = cscripts.cspull() pull['inobs'] = self._events + pull['onsrc'] = '' pull['inmodel'] = self._model pull['outfile'] = 'cspull_py3.dat' pull['ntrials'] = 1 @@ -201,6 +204,7 @@ class Test(test): # Set-up cspull from observation container with unbinned observation pull = cscripts.cspull(obs) pull['inmodel'] = self._model + pull['onsrc'] = '' pull['outfile'] = 'cspull_py4.dat' pull['ntrials'] = 1 pull['caldb'] = self._caldb @@ -220,6 +224,7 @@ class Test(test): pull = cscripts.cspull() pull['inobs'] = self._inobs pull['inmodel'] = self._stacked_model + pull['onsrc'] = '' pull['outfile'] = 'cspull_py5.dat' pull['ntrials'] = 1 pull['enumbins'] = 0 @@ -239,6 +244,7 @@ class Test(test): pull = cscripts.cspull() pull['inobs'] = self._inobs_two pull['inmodel'] = self._model + pull['onsrc'] = '' pull['outfile'] = 'cspull_py6.dat' pull['ntrials'] = 1 pull['emin'] = 0.02 -- libgit2 0.21.4