def test_constraint_str_for_constrained_width(self): test_profile = GramCharlierMassProfile([2,5,7], 16, [1,0,1], k_free=1, sears_flag=1) expected = "2.000000 < Width < 7.000000,C_0 > 0.0,C_4 > 0.0" self.assertEqual(expected, test_profile.create_constraint_str()) prefix = "f0." expected = "2.000000 < f0.Width < 7.000000,f0.C_0 > 0.0,f0.C_4 > 0.0" self.assertEqual(expected, test_profile.create_constraint_str(prefix))
def test_constraint_str_for_fixed_width(self): test_profile = GramCharlierMassProfile(10, 16, [1, 0, 1], k_free=1, sears_flag=1) expected = "C_0 > 0.0,C_4 > 0.0" self.assertEqual(expected, test_profile.create_constraint_str())
def test_constraint_str_for_fixed_width(self): test_profile = GramCharlierMassProfile(10, 16, [1, 0, 1], k_free=1, sears_flag=1) expected = "C_0 > 0.0,C_4 > 0.0" self.assertEqual(expected, test_profile.create_constraint_str())