Esempio n. 1
0
    def test2defaults(self):
        """catalogs.hermes run_hermesVR correct hermesVR command"""

        #-- release version
        unseq, out, returncode = hermes.run_hermesVR(self.testfile,
                                                     wvl_file=self.wvl_file,
                                                     version='release')

        cmd = [
            'python',
            '/STER/mercator/mercator/Hermes/releases/hermes5/pipeline/run/hermesVR.py',
            '-i', '262834', '-w',
            '/STER/mercator/hermes/20091130/reduced/00262831'
        ]
        hermes._subprocess_execute.assert_called_with(cmd, 500)

        #-- trunk version
        unseq, out, returncode = hermes.run_hermesVR(self.testfile,
                                                     wvl_file=self.wvl_file,
                                                     version='trunk',
                                                     timeout=150)

        cmd = [
            'python',
            '/STER/mercator/mercator/Hermes/trunk/hermes/pipeline/run/hermesVR.py',
            '-i', '262834', '-w',
            '/STER/mercator/hermes/20091130/reduced/00262831', '-f'
        ]
        hermes._subprocess_execute.assert_called_with(cmd, 150)
 def test2defaults(self):
     """catalogs.hermes run_hermesVR correct hermesVR command"""
     
     #-- release version
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='release')
     
     cmd = ['python', '/STER/mercator/mercator/Hermes/releases/hermes5/pipeline/run/hermesVR.py',
            '-i', '262834', '-w', '/STER/mercator/hermes/20091130/reduced/00262831']
     hermes._subprocess_execute.assert_called_with(cmd, 500)
     
     #-- trunk version
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='trunk',
                                                  timeout=150)
     
     cmd = ['python', '/STER/mercator/mercator/Hermes/trunk/hermes/pipeline/run/hermesVR.py',
            '-i', '262834', '-w', '/STER/mercator/hermes/20091130/reduced/00262831', '-f']
     hermes._subprocess_execute.assert_called_with(cmd, 150)
 def test3hermes_config(self):
     """catalogs.hermes run_hermesVR write correct hermesConfig"""
     
     #-- release version
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='release',
                                                  unseq=500)
     
     hermes.write_hermesConfig.assert_any_call(Nights = hermes.tempDir, 
                                         CurrentNight = hermes.tempDir + 'hermesvr/',
                                         Reduced = hermes.tempDir)
     
     #-- trunk version
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='trunk',
                                                  unseq=500)
     
     hermes.write_hermesConfig.assert_any_call(Nights = hermes.tempDir + 'hermesvr/', 
                                         CurrentNight = hermes.tempDir + 'hermesvr/',
                                         Reduced = hermes.tempDir)
Esempio n. 4
0
 def test3hermes_config(self):
     """catalogs.hermes run_hermesVR write correct hermesConfig"""
     
     #-- release version
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='release',
                                                  unseq=500)
     
     hermes.write_hermesConfig.assert_any_call(Nights = hermes.tempDir, 
                                         CurrentNight = hermes.tempDir + 'hermesvr/',
                                         Reduced = hermes.tempDir)
     
     #-- trunk version
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='trunk',
                                                  unseq=500)
     
     hermes.write_hermesConfig.assert_any_call(Nights = hermes.tempDir + 'hermesvr/', 
                                         CurrentNight = hermes.tempDir + 'hermesvr/',
                                         Reduced = hermes.tempDir)
 def test2copy_input(self):
     """catalogs.hermes run_hermesVR copy input files"""
     
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='release',
                                                  unseq=500)
     
     #-- copy the input file
     shutil.copyfile.assert_called_with(self.testfile, 
                                        hermes.tempDir + 'hermesvr/reduced/500_HRF_OBJ_ext.fits')
     
     #-- delete the file again
     os.remove.assert_called_with(hermes.tempDir+'hermesvr/reduced/500_HRF_OBJ_ext.fits')
Esempio n. 6
0
 def test2copy_input(self):
     """catalogs.hermes run_hermesVR copy input files"""
     
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='release',
                                                  unseq=500)
     
     #-- copy the input file
     shutil.copyfile.assert_called_with(self.testfile, 
                                        hermes.tempDir + 'hermesvr/reduced/500_HRF_OBJ_ext.fits')
     
     #-- delete the file again
     os.remove.assert_called_with(hermes.tempDir+'hermesvr/reduced/500_HRF_OBJ_ext.fits')
Esempio n. 7
0
    def test1create_delete_dir(self):
        """catalogs.hermes run_hermesVR creating/deleting temp directory"""

        unseq, out, returncode = hermes.run_hermesVR(self.testfile,
                                                     wvl_file=self.wvl_file,
                                                     version='release',
                                                     unseq=500)

        #-- create temp directories
        os.mkdir.assert_any_call(hermes.tempDir + 'hermesvr/')
        os.mkdir.assert_any_call(hermes.tempDir + 'hermesvr/reduced/')

        #-- delete temp directories
        os.rmdir.assert_any_call(hermes.tempDir + 'hermesvr/')
        os.rmdir.assert_any_call(hermes.tempDir + 'hermesvr/reduced/')
 def test1create_delete_dir(self):
     """catalogs.hermes run_hermesVR creating/deleting temp directory"""
     
     
     unseq, out, returncode = hermes.run_hermesVR(self.testfile, wvl_file=self.wvl_file, version='release',
                                                  unseq=500)
     
     #-- create temp directories
     os.mkdir.assert_any_call(hermes.tempDir+'hermesvr/')
     os.mkdir.assert_any_call(hermes.tempDir+'hermesvr/reduced/')
     
     
     
     #-- delete temp directories
     os.rmdir.assert_any_call(hermes.tempDir+'hermesvr/')
     os.rmdir.assert_any_call(hermes.tempDir+'hermesvr/reduced/')