Commit 5cd3af9daeb2d4f0a9bc90ec94710db79ac8d257

Authored by Jürgen Knödlseder
1 parent 0a5969a6

Test all csroot2caldb options

Showing 1 changed file with 19 additions and 10 deletions
test/test_csroot2caldb.py
... ... @@ -80,7 +80,7 @@ class Test(test):
80 80 ' outdir="csroot2caldb_cmd1"'+ \
81 81 ' inst=prod3 id=South_50h version=prod3'+ \
82 82 ' analysis=DESY'+ \
83   - ' logfile="csroot2caldb_cmd1.log" chatter=1'
  83 + ' logfile="csroot2caldb_cmd1.log" chatter=2'
84 84  
85 85 # Check if execution of wrong command fails
86 86 self.test_assert(self._execute('command_that_does_not_exist') != 0,
... ... @@ -98,16 +98,25 @@ class Test(test):
98 98 """
99 99 Test csroot2caldb from Python
100 100 """
101   - # Set-up csroot2caldb
  101 + # Set-up csroot2caldb with a maximum of parameters so that the
  102 + # corresponding code gets tests
102 103 caldb = cscripts.csroot2caldb()
103   - caldb['infile'] = self._infile
104   - caldb['outdir'] = 'csroot2caldb_py1'
105   - caldb['inst'] = 'prod3'
106   - caldb['id'] = 'South_50h'
107   - caldb['version'] = 'prod3'
108   - caldb['analysis'] = 'DESY'
109   - caldb['logfile'] = 'csroot2caldb_py1.log'
110   - caldb['chatter'] = 2
  104 + caldb['infile'] = self._infile
  105 + caldb['outdir'] = 'csroot2caldb_py1'
  106 + caldb['inst'] = 'prod3'
  107 + caldb['id'] = 'South_50h'
  108 + caldb['version'] = 'prod3'
  109 + caldb['analysis'] = 'DESY'
  110 + caldb['psftype'] = 'King'
  111 + caldb['norm1d'] = True
  112 + caldb['rebin'] = True
  113 + caldb['eascale'] = 1.1
  114 + caldb['bgdscale'] = 0.9
  115 + caldb['bgdoversample'] = 3
  116 + caldb['bgdethres'] = 10.0
  117 + caldb['bgdinfill'] = True
  118 + caldb['logfile'] = 'csroot2caldb_py1.log'
  119 + caldb['chatter'] = 4
111 120  
112 121 # Run script
113 122 caldb.logFileOpen() # Make sure we get a log file
... ...