9 PKG =
'phm_hazard_rate_calculation' 10 NAME =
'test_class_electrical_equipment' 19 self.e_eq.qrtz_lambda_b_func(5)
20 result = self.e_eq.get_qrtz_lambda_b()
21 test_result = 0.018823763306560406
24 self.assertAlmostEqual(result, test_result, 5)
31 self.e_eq.con_sock_pi_p_func(5)
32 result = self.e_eq.get_con_sock_pi_p()
33 test_result = 2.012796909336014
36 self.assertAlmostEqual(result, test_result, 5)
43 self.e_eq.con_gen_pi_t_func(35)
44 result = self.e_eq.get_con_gen_pi_t()
45 test_result = 1.1936465129494536
48 self.assertAlmostEqual(result, test_result, 5)
55 self.e_eq.rel_lambda_b_func(35, 85)
56 result = self.e_eq.get_rel_lambda_b()
57 test_result = 0.007502108907236194
60 self.assertAlmostEqual(result, test_result, 5)
64 self.e_eq.rel_lambda_b_func(35, 125)
65 result = self.e_eq.get_rel_lambda_b()
66 test_result = 0.007314777440225106
69 self.assertAlmostEqual(result, test_result, 5)
73 self.e_eq.rel_pi_l_func(10, 1)
74 result = self.e_eq.get_rel_pi_l()
78 self.assertAlmostEqual(result, test_result, 2)
82 self.e_eq.rel_pi_l_func(10, 2)
83 result = self.e_eq.get_rel_pi_l()
87 self.assertAlmostEqual(result, test_result, 2)
91 self.e_eq.rel_pi_l_func(10, 3)
92 result = self.e_eq.get_rel_pi_l()
96 self.assertAlmostEqual(result, test_result, 2)
100 self.e_eq.rel_pi_cyc_func(10, 0)
101 result = self.e_eq.get_rel_pi_cyc()
104 self.assertAlmostEqual(result, test_result, 2)
108 self.e_eq.rel_pi_cyc_func(0.1, 0)
109 result = self.e_eq.get_rel_pi_cyc()
112 self.assertAlmostEqual(result, test_result, 2)
116 self.e_eq.rel_pi_cyc_func(1500, 1)
117 result = self.e_eq.get_rel_pi_cyc()
121 self.assertAlmostEqual(result, test_result, 2)
125 self.e_eq.rel_pi_cyc_func(150, 1)
126 result = self.e_eq.get_rel_pi_cyc()
130 self.assertAlmostEqual(result, test_result, 2)
134 self.e_eq.rel_pi_cyc_func(5, 1)
135 result = self.e_eq.get_rel_pi_cyc()
138 self.assertAlmostEqual(result, test_result, 2)
145 self.e_eq.rd_alpha_b_func(35)
146 result = self.e_eq.get_rd_alpha_b()
147 test_result = 85595.978589058
150 self.assertAlmostEqual(result, test_result, 5)
154 self.e_eq.rd_alpha_w_func(35)
155 result = self.e_eq.get_rd_alpha_w()
156 test_result = 664656.7239197979
159 self.assertAlmostEqual(result, test_result, 5)
166 self.e_eq.res_pi_t_func(35, 1)
167 result = self.e_eq.get_res_pi_t()
168 test_result = 1.2877230710513001
171 self.assertAlmostEqual(result, test_result, 5)
175 self.e_eq.res_pi_t_func(35, 2)
176 result = self.e_eq.get_res_pi_t()
177 test_result = 1.1064428601975629
181 self.assertAlmostEqual(result, test_result, 5)
185 self.e_eq.res_pi_t_func(35, 3)
186 result = self.e_eq.get_res_pi_t()
189 self.assertAlmostEqual(result, test_result, 5)
193 result = self.e_eq.calculate_res_pi_t_func(35, 1)
194 test_result = 3.5408895754801635
198 self.assertAlmostEqual(result, test_result, 5)
202 self.e_eq.res_pi_p_func(35)
203 result = self.e_eq.get_res_pi_p()
204 test_result = 4.001165701268361
208 self.assertAlmostEqual(result, test_result, 5)
212 self.e_eq.res_pi_s_func(0.35, 1)
213 result = self.e_eq.get_res_pi_s()
214 test_result = 1.0434261682232124
218 self.assertAlmostEqual(result, test_result, 5)
222 self.e_eq.res_pi_s_func(0.35, 2)
223 result = self.e_eq.get_res_pi_s()
224 test_result = 1.1027574993576743
228 self.assertAlmostEqual(result, test_result, 5)
232 self.e_eq.res_pi_s_func(0.35, 3)
233 result = self.e_eq.get_res_pi_s()
236 self.assertAlmostEqual(result, test_result, 5)
244 self.e_eq.cc_pi_t_func(35, 0)
245 result = self.e_eq.get_cc_pi_t()
248 self.assertAlmostEqual(result, test_result, 5)
252 self.e_eq.cc_pi_t_func(35, 1)
253 result = self.e_eq.get_cc_pi_t()
254 test_result = 1.2088345313598179
258 self.assertAlmostEqual(result, test_result, 5)
262 self.e_eq.cc_pi_t_func(35, 2)
263 result = self.e_eq.get_cc_pi_t()
264 test_result = 1.5566441151155237
268 self.assertAlmostEqual(result, test_result, 5)
272 self.e_eq.cc_pi_t_func(35, 3)
273 result = self.e_eq.get_cc_pi_t()
276 self.assertAlmostEqual(result, test_result, 5)
280 result = self.e_eq.calculate_cc_pi_t_func(35, 1)
281 test_result = 3.5408895754801635
285 self.assertAlmostEqual(result, test_result, 5)
289 self.e_eq.cc_pi_c_func(35, 0)
290 result = self.e_eq.get_cc_pi_c()
293 self.assertAlmostEqual(result, test_result, 5)
297 self.e_eq.cc_pi_c_func(35, 1)
298 result = self.e_eq.get_cc_pi_c()
299 test_result = 1.3771020474505347
303 self.assertAlmostEqual(result, test_result, 5)
307 self.e_eq.cc_pi_c_func(35, 2)
308 result = self.e_eq.get_cc_pi_c()
309 test_result = 2.265351770958606
313 self.assertAlmostEqual(result, test_result, 5)
317 self.e_eq.cc_pi_c_func(35, 3)
318 result = self.e_eq.get_cc_pi_c()
321 self.assertAlmostEqual(result, test_result, 5)
325 self.e_eq.cc_pi_v_func(0.35, 0)
326 result = self.e_eq.get_cc_pi_v()
329 self.assertAlmostEqual(result, test_result, 5)
333 self.e_eq.cc_pi_v_func(0.35, 1)
334 result = self.e_eq.get_cc_pi_v()
335 test_result = 1.0675435635288066
339 self.assertAlmostEqual(result, test_result, 5)
343 self.e_eq.cc_pi_v_func(0.35, 2)
344 result = self.e_eq.get_cc_pi_v()
345 test_result = 1.0045621329741699
349 self.assertAlmostEqual(result, test_result, 5)
353 self.e_eq.cc_pi_v_func(0.35, 3)
354 result = self.e_eq.get_cc_pi_v()
355 test_result = 1.1984953703703705
359 self.assertAlmostEqual(result, test_result, 5)
363 self.e_eq.cc_pi_v_func(0.35, 4)
364 result = self.e_eq.get_cc_pi_v()
365 test_result = 1.0001048541194446
369 self.assertAlmostEqual(result, test_result, 5)
373 self.e_eq.cc_pi_v_func(0.35, 5)
374 result = self.e_eq.get_cc_pi_v()
375 test_result = 1.1984953703703705
379 self.assertAlmostEqual(result, test_result, 5)
383 self.e_eq.cc_pi_v_func(0.35, 6)
384 result = self.e_eq.get_cc_pi_v()
387 self.assertAlmostEqual(result, test_result, 5)
391 self.e_eq.cc_pi_sr_func(
"None")
392 result = self.e_eq.get_cc_pi_sr()
395 self.assertAlmostEqual(result, test_result, 2)
399 self.e_eq.cc_pi_sr_func(
"cr_g_0_8")
400 result = self.e_eq.get_cc_pi_sr()
403 self.assertAlmostEqual(result, test_result, 2)
407 self.e_eq.cc_pi_sr_func(
"cr_g_0_6_to_0_8")
408 result = self.e_eq.get_cc_pi_sr()
411 self.assertAlmostEqual(result, test_result, 2)
415 self.e_eq.cc_pi_sr_func(
"cr_g_0_4_to_0_6")
416 result = self.e_eq.get_cc_pi_sr()
419 self.assertAlmostEqual(result, test_result, 2)
423 self.e_eq.cc_pi_sr_func(
"cr_g_0_2_to_0_4")
424 result = self.e_eq.get_cc_pi_sr()
427 self.assertAlmostEqual(result, test_result, 2)
431 self.e_eq.cc_pi_sr_func(
"cr_g_0_1_to_0_2")
432 result = self.e_eq.get_cc_pi_sr()
435 self.assertAlmostEqual(result, test_result, 2)
439 self.e_eq.cc_pi_sr_func(
"cr_0_to_0_1")
440 result = self.e_eq.get_cc_pi_sr()
443 self.assertAlmostEqual(result, test_result, 2)
447 self.e_eq.cc_pi_sr_func(35)
448 result = self.e_eq.get_cc_pi_sr()
451 self.assertAlmostEqual(result, test_result, 2)
459 self.e_eq.dd_pi_t_func(35, 0)
460 result = self.e_eq.get_dd_pi_t()
463 self.assertAlmostEqual(result, test_result, 2)
467 self.e_eq.dd_pi_t_func(35, 1)
468 result = self.e_eq.get_dd_pi_t()
469 test_result = 1.2333469156667014
473 self.assertAlmostEqual(result, test_result, 5)
477 self.e_eq.dd_pi_t_func(35, 2)
478 result = self.e_eq.get_dd_pi_t()
479 test_result = 1.4004154404247757
483 self.assertAlmostEqual(result, test_result, 5)
487 self.e_eq.dd_pi_t_func(35, 3)
488 result = self.e_eq.get_dd_pi_t()
491 self.assertAlmostEqual(result, test_result, 2)
495 result = self.e_eq.calculate_dd_pi_t_func(35, 1925)
496 test_result = 1.2333469156667014
500 self.assertAlmostEqual(result, test_result, 5)
504 self.e_eq.dd_pi_s_func(0.25, 1)
505 result = self.e_eq.get_dd_pi_s()
508 self.assertAlmostEqual(result, test_result, 3)
512 self.e_eq.dd_pi_s_func(0.35, 1)
513 result = self.e_eq.get_dd_pi_s()
514 test_result = 0.07799833781904994
518 self.assertAlmostEqual(result, test_result, 5)
522 self.e_eq.dd_pi_s_func(35, 2)
523 result = self.e_eq.get_dd_pi_s()
526 self.assertAlmostEqual(result, test_result, 2)
530 self.e_eq.dd_pi_s_func(35, 3)
531 result = self.e_eq.get_dd_pi_s()
534 self.assertAlmostEqual(result, test_result, 2)
542 self.e_eq.id_pi_t_func(35, 0)
543 result = self.e_eq.get_id_pi_t()
546 self.assertAlmostEqual(result, test_result, 2)
550 self.e_eq.id_pi_t_func(35, 1)
551 result = self.e_eq.get_id_pi_t()
552 test_result = 1.1492178478655128
557 self.assertAlmostEqual(result, test_result, 5)
561 self.e_eq.id_pi_t_func(35, 2)
562 result = self.e_eq.get_id_pi_t()
565 self.assertAlmostEqual(result, test_result, 2)
572 self.e_eq.ts_pi_t_func(35, 0)
573 result = self.e_eq.get_ts_pi_t()
576 self.assertAlmostEqual(result, test_result, 2)
580 self.e_eq.ts_pi_t_func(35, 1)
581 result = self.e_eq.get_ts_pi_t()
582 test_result = 1.2333469156667014
586 self.assertAlmostEqual(result, test_result, 5)
590 self.e_eq.ts_pi_t_func(35, 2)
591 result = self.e_eq.get_ts_pi_t()
594 self.assertAlmostEqual(result, test_result, 2)
598 if __name__ ==
'__main__':
599 rosunit.unitrun(PKG, NAME, TestElectricalEquipment, sysargs =
"--cov", coverage_packages=[str(PKG)])
def test_res_pi_s_func_1(self)
def test_dd_pi_t_func_1(self)
def test_cc_pi_t_func_4(self)
def test_cc_pi_sr_func_8(self)
def test_rel_pi_l_func_3(self)
def test_dd_pi_t_func_3(self)
def test_rel_pi_cyc_func_1(self)
def test_cc_pi_v_func_7(self)
def test_cc_pi_v_func_5(self)
def test_dd_pi_s_func_2(self)
def test_cc_pi_sr_func_7(self)
def test_res_pi_s_func_3(self)
def test_cc_pi_v_func_1(self)
def test_rel_pi_cyc_func_2(self)
def test_cc_pi_v_func_2(self)
def test_cc_pi_c_func_3(self)
def test_calculate_dd_pi_t_func(self)
def test_cc_pi_sr_func_3(self)
def test_cc_pi_sr_func_4(self)
def test_res_pi_t_func_3(self)
def test_cc_pi_t_func_2(self)
def test_res_pi_t_func_1(self)
def test_rel_pi_cyc_func_3(self)
def test_res_pi_s_func_2(self)
def test_ts_pi_t_func_2(self)
def test_rd_alpha_b_func(self)
def test_dd_pi_s_func_3(self)
def test_cc_pi_c_func_1(self)
def test_res_pi_p_func(self)
def test_con_gen_pi_t_func(self)
def test_dd_pi_s_func_4(self)
def test_cc_pi_v_func_4(self)
def test_cc_pi_v_func_6(self)
def test_rd_alpha_w_func(self)
def test_rel_pi_cyc_func_4(self)
def test_qrtz_lambda_b_func(self)
def test_id_pi_t_func_2(self)
def test_cc_pi_sr_func_5(self)
def test_cc_pi_t_func_1(self)
def test_id_pi_t_func_3(self)
def test_calculate_cc_pi_t_func(self)
def test_dd_pi_s_func_1(self)
def test_con_sock_pi_p_func(self)
def test_cc_pi_t_func_3(self)
def test_dd_pi_t_func_4(self)
def test_dd_pi_t_func_2(self)
def test_rel_pi_l_func_1(self)
def test_rel_lambda_b_func_2(self)
def test_rel_lambda_b_func_1(self)
def test_cc_pi_c_func_4(self)
def test_res_pi_t_func_2(self)
def test_cc_pi_sr_func_2(self)
def test_rel_pi_cyc_func_5(self)
def test_id_pi_t_func_1(self)
def test_calculate_res_pi_t_func(self)
def test_ts_pi_t_func_3(self)
def test_ts_pi_t_func_1(self)
def test_cc_pi_v_func_3(self)
def test_cc_pi_c_func_2(self)
def test_rel_pi_l_func_2(self)
def test_cc_pi_sr_func_6(self)
def test_cc_pi_sr_func_1(self)