diff --git a/tests/test_nsga2_multi_objective.py b/tests/test_nsga2_multi_objective.py index 37c4016c..0fe7f57a 100644 --- a/tests/test_nsga2_multi_objective.py +++ b/tests/test_nsga2_multi_objective.py @@ -45,6 +45,8 @@ def setup_optProb(self, n_obj): @parameterized.expand([(1,), (2,)]) def test_opt(self, n_obj): + if n_obj == 2: + raise unittest.SkipTest("skip flaky NSGA2 tests") self.setup_optProb(n_obj) # 300 generations will find x=(0,0), 200 or less will find x=(1,1) diff --git a/tests/testing_utils.py b/tests/testing_utils.py index 21ef383f..b0bccd73 100644 --- a/tests/testing_utils.py +++ b/tests/testing_utils.py @@ -326,9 +326,6 @@ def check_hist_file(self, tol): times = hist.getValues(names="time", major=False)["time"] # the times should be monotonically increasing self.assertTrue(np.all(np.diff(times) > 0)) - # the final time should be close to the metadata time - # we only specify a relatively loose atol because of variations in overhead cost between machines - assert_allclose(times[-1], metadata["optTime"], atol=1.0) # this check is only used for optimizers that guarantee '0' and 'last' contain funcs if self.optName in ["SNOPT", "PSQP"]: