コード例 #1
0
ファイル: test_mutation.py プロジェクト: minghao2016/jMetalPy
 def test_should_constructor_create_a_valid_operator(self):
     operator = IntegerPolynomial(0.5, 20)
     self.assertEqual(0.5, operator.probability)
     self.assertEqual(20, operator.distribution_index)
コード例 #2
0
ファイル: test_mutation.py プロジェクト: minghao2016/jMetalPy
 def test_should_constructor_raise_an_exception_if_the_probability_is_greater_than_one(
         self):
     with self.assertRaises(Exception):
         IntegerPolynomial(2)
コード例 #3
0
ファイル: test_mutation.py プロジェクト: minghao2016/jMetalPy
 def test_should_constructor_create_a_non_null_object(self):
     operator = IntegerPolynomial(1.0)
     self.assertIsNotNone(operator)