diff --git a/test/test_ctselect.py b/test/test_ctselect.py index 9a845ef..39471de 100755 --- a/test/test_ctselect.py +++ b/test/test_ctselect.py @@ -59,6 +59,7 @@ class Test(test): self.append(self._test_empty_ctselect_tool, 'CTSELECT - Test empty ctselect tool') self.append(self._test_saving_empty_does_nothing, 'CTSELECT - Test saving empty does nothing') self.append(self._test_with_parameters,'CTSELECT - Test with parameters') + self.append(self._test_time_selcetion,'CTSELECT - Test time selection') self.append(self._test_for_ctselect_copy,'CTSELECT - Test ctselect copy') self.append(self._test_set_emin_emax, 'CTSELECT - Test set emin emax') self.append(self._test_energy_range_beyond_covered, 'CTSELECT - Test energy range beyond energies covered') @@ -343,6 +344,28 @@ class Test(test): # Return return + # Unit Test time selection + def _test_time_selection(self): + """ + Unit Test time selection + + """ + select = self._setup(inobs=self._events,tmin=0.0,tmax=10.0,emin=0.2,emax=80,outobs='ctselect_pyTimeSelection.fits',logfile='ctselect_pyTimeSelection.log') + + # Run ctselect tool + select.logFileOpen() # Make sure we get a log file + select.run() + select.save() + + # Check result file + self._check_result_file('ctselect_pyTimeSelection.fits', 'time selection',nevents=10) + + + self._teardown(select) + + # Return + return + # Unit Test for ctselect copy def _test_for_ctselect_copy(self): """