Commit 62bb13ae authored by Yan Zhaojun's avatar Yan Zhaojun
Browse files

debug

parent 4716160c
Pipeline #4103 passed with stage
in 0 seconds
......@@ -5355,11 +5355,7 @@ class IFSsimulator():
self.simnumber = simnumber
self.configure(simnumber) # print the configfile name and path;
if self.information['debug']=='yes':
self.debug = True
else:
self.debug = False
self.debug = self.information['debug']
self.dt = datetime.utcnow()
......@@ -5617,7 +5613,7 @@ class IFSsimulator():
############################################################################
def runIFSsim(sourcein, configfile, dir_path, iLoop, applyhole='no'):
def runIFSsim(sourcein, configfile, dir_path, iLoop, debug, applyhole='no'):
"""
......@@ -5650,6 +5646,8 @@ def runIFSsim(sourcein, configfile, dir_path, iLoop, applyhole='no'):
### dir_path = os.path.join(os.environ['UNIT_TEST_DATA_ROOT'], 'ifs_sim/')
simulate[iLoop].information['dir_path'] = dir_path
simulate[iLoop].information['debug'] =debug
simulate[iLoop].simulate(sourcein, iLoop)
return 1
......
......@@ -42,7 +42,8 @@ class TestDemoFunction(unittest.TestCase):
sourcein = 'SCI'
print(configfile)
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, 'no')
debug=True
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, debug,'no')
self.assertEqual(
1 , 1,
"case 1: SCI sim passes.",
......@@ -75,7 +76,9 @@ class TestDemoFunction(unittest.TestCase):
sourcein = 'BIAS'
print(configfile)
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, 'no')
debug=True
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, debug,'no')
self.assertEqual(
1 , 1,
"case 2: sim passes.",
......@@ -108,7 +111,9 @@ class TestDemoFunction(unittest.TestCase):
sourcein = 'DARK'
print(configfile)
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, 'no')
debug=True
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, debug,'no')
self.assertEqual(
1 , 1,
"case 3: sim passes.",
......@@ -141,7 +146,8 @@ class TestDemoFunction(unittest.TestCase):
sourcein = 'LAMP'
print(configfile)
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, 'no')
debug=True
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, debug,'no')
self.assertEqual(
1 , 1,
"case 4: sim passes.",
......@@ -174,7 +180,8 @@ class TestDemoFunction(unittest.TestCase):
sourcein = 'LAMP'
print(configfile)
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, 'yes')
debug=True
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, debug,'no')
self.assertEqual(
1 , 1,
"case 5: sim passes.",
......@@ -207,7 +214,8 @@ class TestDemoFunction(unittest.TestCase):
sourcein = 'FLAT'
print(configfile)
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, 'no')
debug=True
csst_ifs_sim.runIFSsim(sourcein, configfile, dir_path, 1, debug,'no')
self.assertEqual(
1 , 1,
"case 6: sim passes.",
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment