示例#1
0
    def test_calc_default_resistance_coeffs_base_model(self):
        tm = 1000  # test_mass

        bm = model._get_model_base()
        regression_curves = bm['params']['resistance_coeffs_regression_curves']
        res = ex.calc_default_resistance_coeffs(tm, regression_curves)
        print(res)
        self.assertEqual(len(res), 3)
示例#2
0
    def test_calc_default_resistance_coeffs_base_model(self):
        tm = 1000 # test_mass

        bm = model._get_model_base()
        regression_curves = bm['params']['resistance_coeffs_regression_curves']
        res = ex.calc_default_resistance_coeffs(tm, regression_curves)
        print(res)
        self.assertEqual(len(res), 3)
示例#3
0
    def test_calc_default_resistance_coeffs(self):
        tm = 1000  # test_mass

        identity = (1, 0)
        res = ex.calc_default_resistance_coeffs(tm, [identity] * 3)
        print(res)
        self.assertEqual(res, (tm, tm, tm))

        zero = (0, 0)
        res = ex.calc_default_resistance_coeffs(tm, [zero] * 3)
        print(res)
        self.assertEqual(res, (0, 0, 0))

        a_num = 123
        replace = (0, a_num)
        res = ex.calc_default_resistance_coeffs(tm, [replace] * 3)
        print(res)
        self.assertEqual(res, (a_num, a_num, a_num))
示例#4
0
    def test_calc_default_resistance_coeffs(self):
        tm = 1000 # test_mass

        identity = (1,0)
        res = ex.calc_default_resistance_coeffs(tm, [identity]*3)
        print(res)
        self.assertEqual(res, (tm, tm, tm))

        zero = (0,0)
        res = ex.calc_default_resistance_coeffs(tm, [zero]*3)
        print(res)
        self.assertEqual(res, (0, 0, 0))

        a_num = 123
        replace = (0, a_num)
        res = ex.calc_default_resistance_coeffs(tm, [replace]*3)
        print(res)
        self.assertEqual(res, (a_num, a_num, a_num))