Loading tests/test_SpecDisperse.py +7 −7 Original line number Diff line number Diff line # #need add environment parameter TEST_HOME, link to "testData/" #need add environment parameter UNIT_TEST_DATA_ROOT, link to "testData/" #linx and mac can run as follow, need modify the name of file directory #export TEST_HOME=/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData #export UNIT_TEST_DATA_ROOT=/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData # import unittest from ObservationSim.MockObject.SpecDisperser import rotate90, SpecDisperser Loading Loading @@ -145,9 +145,9 @@ class TestSpecDisperse(unittest.TestCase): def __init__(self, methodName='runTest'): super(TestSpecDisperse,self).__init__(methodName) self.conff= os.path.join(os.getenv('TEST_HOME'), 'CSST_GI2.conf') self.throughputf= os.path.join(os.getenv('TEST_HOME'), 'GI.Throughput.1st.fits') self.testDir = os.getenv('TEST_HOME') self.conff= os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'CSST_GI2.conf') self.throughputf= os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'GI.Throughput.1st.fits') self.testDir = os.getenv('UNIT_TEST_DATA_ROOT') # self.conff = conff # self.throughputf = throughputf Loading Loading @@ -697,8 +697,8 @@ class TestSpecDisperse(unittest.TestCase): if __name__ == '__main__': os.environ['TEST_HOME']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData" testDir = os.getenv('TEST_HOME') os.environ['UNIT_TEST_DATA_ROOT']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData" testDir = os.getenv('UNIT_TEST_DATA_ROOT') # conff= os.path.join(testDir, 'CSST_GI2.conf') # throughputf= os.path.join(testDir, 'GI.Throughput.1st.fits') suit = unittest.TestSuite() Loading tests/test_Straylight.py +4 −4 Original line number Diff line number Diff line # #need add environment parameter TEST_HOME, link to "testData/" #need add environment parameter UNIT_TEST_DATA_ROOT, link to "testData/" #linx and mac can run as follow, need modify the name of file directory #export TEST_HOME=/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData #export UNIT_TEST_DATA_ROOT=/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData # import unittest from ObservationSim.Straylight import Straylight Loading Loading @@ -71,7 +71,7 @@ class TestStraylight(unittest.TestCase): def __init__(self, methodName='runTest', filter = 'i', grating = "GI"): super(TestStraylight,self).__init__(methodName) self.pointingData = np.loadtxt(os.path.join(os.getenv('TEST_HOME'), 'Straylight_test.dat'), dtype=np.double) self.pointingData = np.loadtxt(os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'Straylight_test.dat'), dtype=np.double) self.filter = filter self.grating = grating Loading Loading @@ -184,7 +184,7 @@ class TestStraylight(unittest.TestCase): if __name__ == '__main__': os.environ['TEST_HOME']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData" os.environ['UNIT_TEST_DATA_ROOT']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData" suit = unittest.TestSuite() case1 = TestStraylight('test_EarthShineFilter', filter = 'i') Loading Loading
tests/test_SpecDisperse.py +7 −7 Original line number Diff line number Diff line # #need add environment parameter TEST_HOME, link to "testData/" #need add environment parameter UNIT_TEST_DATA_ROOT, link to "testData/" #linx and mac can run as follow, need modify the name of file directory #export TEST_HOME=/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData #export UNIT_TEST_DATA_ROOT=/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData # import unittest from ObservationSim.MockObject.SpecDisperser import rotate90, SpecDisperser Loading Loading @@ -145,9 +145,9 @@ class TestSpecDisperse(unittest.TestCase): def __init__(self, methodName='runTest'): super(TestSpecDisperse,self).__init__(methodName) self.conff= os.path.join(os.getenv('TEST_HOME'), 'CSST_GI2.conf') self.throughputf= os.path.join(os.getenv('TEST_HOME'), 'GI.Throughput.1st.fits') self.testDir = os.getenv('TEST_HOME') self.conff= os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'CSST_GI2.conf') self.throughputf= os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'GI.Throughput.1st.fits') self.testDir = os.getenv('UNIT_TEST_DATA_ROOT') # self.conff = conff # self.throughputf = throughputf Loading Loading @@ -697,8 +697,8 @@ class TestSpecDisperse(unittest.TestCase): if __name__ == '__main__': os.environ['TEST_HOME']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData" testDir = os.getenv('TEST_HOME') os.environ['UNIT_TEST_DATA_ROOT']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData" testDir = os.getenv('UNIT_TEST_DATA_ROOT') # conff= os.path.join(testDir, 'CSST_GI2.conf') # throughputf= os.path.join(testDir, 'GI.Throughput.1st.fits') suit = unittest.TestSuite() Loading
tests/test_Straylight.py +4 −4 Original line number Diff line number Diff line # #need add environment parameter TEST_HOME, link to "testData/" #need add environment parameter UNIT_TEST_DATA_ROOT, link to "testData/" #linx and mac can run as follow, need modify the name of file directory #export TEST_HOME=/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData #export UNIT_TEST_DATA_ROOT=/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData # import unittest from ObservationSim.Straylight import Straylight Loading Loading @@ -71,7 +71,7 @@ class TestStraylight(unittest.TestCase): def __init__(self, methodName='runTest', filter = 'i', grating = "GI"): super(TestStraylight,self).__init__(methodName) self.pointingData = np.loadtxt(os.path.join(os.getenv('TEST_HOME'), 'Straylight_test.dat'), dtype=np.double) self.pointingData = np.loadtxt(os.path.join(os.getenv('UNIT_TEST_DATA_ROOT'), 'Straylight_test.dat'), dtype=np.double) self.filter = filter self.grating = grating Loading Loading @@ -184,7 +184,7 @@ class TestStraylight(unittest.TestCase): if __name__ == '__main__': os.environ['TEST_HOME']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData" os.environ['UNIT_TEST_DATA_ROOT']="/Users/zhangxin/Work/SlitlessSim/CSST_SIM/CSST_develop/csst-simulation/tests/testData" suit = unittest.TestSuite() case1 = TestStraylight('test_EarthShineFilter', filter = 'i') Loading