Пример #1
0
 def test_fix_make_with_dbl_comps_201(self):
     """ Test fixing make_with_dbl_comps when qpec_type = 201.
     """
     self.param["make_with_dbl_comps"] = True
     res = helpers.sanitize_params(self.param, qpec_type=201)
     self.assertFalse(res["make_with_dbl_comps"])
Пример #2
0
 def test_fix_yinfirstlevel(self):
     """ Test fixing yinfirstlevel.
     """
     self.param["yinfirstlevel"] = None
     res = helpers.sanitize_params(self.param)
     self.assertTrue(res["yinfirstlevel"])
Пример #3
0
 def test_fix_missing_make_with_dbl_comps(self):
     """ Test fixing missing yinfirstlevel.
     """
     del self.param["make_with_dbl_comps"]
     res = helpers.sanitize_params(self.param)
     self.assertFalse(res["make_with_dbl_comps"])
Пример #4
0
 def test_fix_first_deg(self):
     """ Test fixing first_deg.
     """
     self.param["first_deg"] = self.param["l"] + 100
     res = helpers.sanitize_params(self.param)
     self.assertEqual(res["first_deg"], self.param["l"])
Пример #5
0
 def test_fix_mix_deg(self):
     """ Test fixing mix_deg.
     """
     self.param["mix_deg"] = self.param["second_deg"] + 100
     res = helpers.sanitize_params(self.param)
     self.assertEqual(res["mix_deg"], self.param["second_deg"])
Пример #6
0
 def test_fix_l_800(self):
     """ Test fixing l when qpec_type = 800.
     """
     res = helpers.sanitize_params(self.param, qpec_type=800)
     self.assertEqual(res["l"], 0)
Пример #7
0
 def test_fix_n_800(self):
     """ Test fixing n when qpec_type = 800.
     """
     self.param["n"] = self.param["m"] + 100
     res = helpers.sanitize_params(self.param, qpec_type=800)
     self.assertEqual(res["n"], self.param["m"])
Пример #8
0
 def test_fix_missing_p(self):
     """ Test fixing missing p.
     """
     del self.param["p"]
     res = helpers.sanitize_params(self.param)
     self.assertEqual(res["p"], self.param["m"])
Пример #9
0
 def test_fix_second_deg_200(self):
     """ Test fixing second_deg when qpec_type = 200.
     """
     self.param["second_deg"] = self.param["m"] + 100
     res = helpers.sanitize_params(self.param, qpec_type=200)
     self.assertEqual(res["second_deg"], self.param["m"])
Пример #10
0
 def test_fix_missing_scale_M(self):
     """ Test fixing missing scale_M.
     """
     del self.param["scale_M"]
     res = helpers.sanitize_params(self.param)
     self.assertEqual(res["scale_M"], self.param["cond_M"])
Пример #11
0
 def test_fix_scale_P(self):
     """ Test fixing scale_P.
     """
     self.param["scale_P"] = 0
     res = helpers.sanitize_params(self.param)
     self.assertEqual(res["scale_P"], self.param["cond_P"])
Пример #12
0
 def test_fix_cond_M(self):
     """ Test fixing cond_M.
     """
     self.param["cond_M"] = 0
     res = helpers.sanitize_params(self.param)
     self.assertEqual(res["cond_M"], 10)
Пример #13
0
 def test_fix_mono_M(self):
     """ Test fixing mono_M.
     """
     self.param["mono_M"] = None
     res = helpers.sanitize_params(self.param)
     self.assertTrue(res["mono_M"])
Пример #14
0
 def test_fix_convex_f(self):
     """ Test fixing convex_f.
     """
     self.param["convex_f"] = None
     res = helpers.sanitize_params(self.param)
     self.assertTrue(res["convex_f"])