def test_limit_switch_final(): vst, ist, abt, gst, ptl, tcl, lcl = _init_system() setNanny(abt, 1) script_dir = os.path.dirname(__file__) file = os.path.join(script_dir, '../raw/limit_data.txt') ls_data = getLSData(file) check_limit_switch(abt, vst, ls_data) assert getAbortState(abt) == 1
def test_check_final_limits(): vst, ist, abt, gst, ptl, tcl, lcl = _init_system() setNanny(abt, 1) script_dir = os.path.dirname(__file__) file = os.path.join(script_dir, '../raw/press_data.txt') pt_data_1 = getLCData(file) script_dir = os.path.dirname(__file__) file = os.path.join(script_dir, '../raw/therm_data_2.txt') tc_data_2 = getLCData(file) script_dir = os.path.dirname(__file__) file = os.path.join(script_dir, '../raw/load_data_2.txt') lc_data_2 = getLCData(file) check_limits(abt, ptl, tcl, lcl, pt_data_1, tc_data_2, lc_data_2) assert getAbortState(abt) == 1
parser.add_argument('-g','--go',action = 'store_true',required = False, help = 'Turn "GO/NOGO" to "GO" and change ignitor state') parser.add_argument('-t','--test',action = 'store_true',required = False, help = 'Tests system with input sensor data') args = parser.parse_args() if args.start == True: vst, ist, abt, gst, ptl, tcl, lcl = _init_system() print(' ') print(' ') print('Initialize System:') print('(SAFE MODE) Valve State =', getValveState(vst, ist, abt)) print('(SAFE MODE) Ignitor State =', getIgnitorState(vst, ist, abt, gst)) print('(OFF) Nanny =', getNanny(abt)) print('(NOGO) GO/NOGO =', getGOState(gst)) print('(NOMINAL) Abort State =', getAbortState(abt)) print(' ') print(' ') elif args.nanny == True: vst, ist, abt, gst, ptl, tcl, lcl = _init_system() setNanny(abt, 1) print(' ') print(' ') print('Initialize System and turn "Nanny" to "ON":') print('(ON) Nanny =', getNanny(abt)) print(' ') print(' ') elif args.go == True: vst, ist, abt, gst, ptl, tcl, lcl = _init_system() print(' ') print(' ')
def test_abort_set(): vst, ist, abt, gst, ptl, tcl, lcl = _init_system() setAbortState(abt, 1) assert getAbortState(abt) == 1