Commit 1b010f6e3d2a274228ac4bb661a0678d80c4b487
1 parent
c59d9b36
Complete cttsmap tests after last merge
Showing
1 changed file
with
8 additions
and
5 deletions
test/test_cttsmap.py
| @@ -97,21 +97,24 @@ class Test(test): | @@ -97,21 +97,24 @@ class Test(test): | ||
| 97 | # Check if execution failed | 97 | # Check if execution failed |
| 98 | self.test_assert(self._execute(cmd) != 0, | 98 | self.test_assert(self._execute(cmd) != 0, |
| 99 | 'Check invalid input file when executed from command line') | 99 | 'Check invalid input file when executed from command line') |
| 100 | - | 100 | + |
| 101 | # Setup cttsmap command | 101 | # Setup cttsmap command |
| 102 | cmd = cttsmap+' inobs="'+self._events+'"'+ \ | 102 | cmd = cttsmap+' inobs="'+self._events+'"'+ \ |
| 103 | ' inmodel="'+self._model+'" srcname="Crab"'+ \ | 103 | ' inmodel="'+self._model+'" srcname="Crab"'+ \ |
| 104 | ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ | 104 | ' caldb="'+self._caldb+'" irf="'+self._irf+'"'+ \ |
| 105 | ' errors=yes'+ \ | 105 | ' errors=yes'+ \ |
| 106 | - ' outmap="cttsmap_cmd1.fits"'+ \ | ||
| 107 | - ' nxpix=5 nypix=5 binsz=0.02'+ \ | 106 | + ' outmap="cttsmap_cmd3.fits"'+ \ |
| 107 | + ' nxpix=3 nypix=3 binsz=0.02'+ \ | ||
| 108 | ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \ | 108 | ' coordsys="CEL" proj="CAR" xref=83.63 yref=22.01'+ \ |
| 109 | - ' logfile="cttsmap_cmd1.log" chatter=1' | 109 | + ' logfile="cttsmap_cmd3.log" chatter=1' |
| 110 | 110 | ||
| 111 | # Check if execution was successful | 111 | # Check if execution was successful |
| 112 | self.test_assert(self._execute(cmd) == 0, | 112 | self.test_assert(self._execute(cmd) == 0, |
| 113 | 'Check successful execution from command line') | 113 | 'Check successful execution from command line') |
| 114 | 114 | ||
| 115 | + # Check result file | ||
| 116 | + self._check_result_file('cttsmap_cmd3.fits') | ||
| 117 | + | ||
| 115 | # Setup cttsmap --help option | 118 | # Setup cttsmap --help option |
| 116 | cmd = cttsmap+' --help' | 119 | cmd = cttsmap+' --help' |
| 117 | 120 | ||
| @@ -281,7 +284,7 @@ class Test(test): | @@ -281,7 +284,7 @@ class Test(test): | ||
| 281 | nmaps = 1 | 284 | nmaps = 1 |
| 282 | else: | 285 | else: |
| 283 | nmaps = 0 | 286 | nmaps = 0 |
| 284 | - | 287 | + |
| 285 | # Check dimensions | 288 | # Check dimensions |
| 286 | self.test_value(tsmap.nmaps(), nmaps, 'Check number of maps') | 289 | self.test_value(tsmap.nmaps(), nmaps, 'Check number of maps') |
| 287 | self.test_value(tsmap.nx(), nx, 'Check for number of X pixels') | 290 | self.test_value(tsmap.nx(), nx, 'Check for number of X pixels') |