def test_generalizedBell16_membership_function(self): self.assertAlmostEqual(gbellmf.gbellmf(10.0, [2.0, 4.0, 6.0]), 0.0039, places=3)
def test_generalizedBell1_membership_function(self): with self.assertRaises(TypeError): # test for zero A input gbellmf.gbellmf(0, [0.0, 4.0, 6.0])
def test_generalizedBell14_membership_function(self): self.assertAlmostEqual(gbellmf.gbellmf(7.0, [2.0, 4.0, 6.0]), 1, places=2)
def test_generalizedBell8_membership_function(self): self.assertEqual(gbellmf.gbellmf(8.0, [2.0, 4.0, 6.0]), 0.5)
def test_generalizedBell5_membership_function(self): with self.assertRaises(TypeError): # test for wrong type input tuple instead of list gbellmf.gbellmf(6, (2.0, 4.0, 6.0))
def test_generalizedBell4_membership_function(self): with self.assertRaises(TypeError): # test for non float list input gbellmf.gbellmf(6, [2, 4.0, 6.0])
def test_generalizedBell3_membership_function(self): with self.assertRaises(TypeError): # test for non list input gbellmf.gbellmf(6, 6.0)
def test_generalizedBell2_membership_function(self): with self.assertRaises(TypeError): # test for list with wrong length gbellmf.gbellmf(6, [2.0, 6.0])