Newer
Older
from Engineering_tools import *
import unittest
"""
This is a prototype of test bench for Engineering_tools functions
Each function can be tested using a set of specific parameters.
The results can be evaluated and the success of test is defined by asser****
function call.
def test_initial_vel(self):
latitude = 30
v_velocity = initial_vel(latitude)
self.assertTrue(v_velocity is not None)
def test_final_target_vel(self):
v_orbit_semi_major_axis = 637800000
v_f_velocity = final_target_vel(v_eject_altitude,v_orbit_semi_major_axis)
self.assertTrue(v_f_velocity is not None)
def test_staging_optim(self):
v_isp1 = 300
v_isp2 = 300
v_eps1 = 0.8
v_eps2 = 0.7
v_Vc = 100
v_Mp = 3000
v_m1, v_m2 = staging_optim(v_isp1,v_isp2,v_eps1,v_eps2,v_Vc,v_Mp)
self.assertTrue(v_m1 is not None and v_m2 is not None)
if __name__ == '__main__':
unittest.main()