From bdc0fd85ca80c25d3b251524e0cb30df5611b7d9 Mon Sep 17 00:00:00 2001 From: Paul-Saves Date: Wed, 15 Nov 2023 12:37:06 +0100 Subject: [PATCH] update tests --- smt/applications/tests/test_mixed_integer.py | 6 ------ smt/utils/test/test_design_space.py | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/smt/applications/tests/test_mixed_integer.py b/smt/applications/tests/test_mixed_integer.py index 79f47ed40..abfaf972b 100644 --- a/smt/applications/tests/test_mixed_integer.py +++ b/smt/applications/tests/test_mixed_integer.py @@ -244,12 +244,6 @@ def test_cast_to_discrete_values(self): atol=1e-9, ) - np.testing.assert_allclose( - np.array([[2.6, 0, 1, 0, 0, 1, 3]]), - design_space.correct_get_acting(x)[0], - atol=1e-9, - ) - def test_cast_to_discrete_values_with_smooth_rounding_ordinal_values(self): x = np.array([[2.6, 0.3, 0.5, 0.25, 0.45, 0.85, 1.1]]) design_space = DesignSpace( diff --git a/smt/utils/test/test_design_space.py b/smt/utils/test/test_design_space.py index b489df0dd..cb6523c0a 100644 --- a/smt/utils/test/test_design_space.py +++ b/smt/utils/test/test_design_space.py @@ -158,7 +158,7 @@ def test_base_design_space(self): ) ) self.assertEqual(is_acting_unfolded.dtype, bool) - np.testing.assert_allclose( + np.testing.assert_array_equal( is_acting_unfolded, [ [True, True, True, False], @@ -380,7 +380,7 @@ def test_design_space_hierarchical(self): ] ), ) - np.testing.assert_allclose( + np.testing.assert_array_equal( is_acting[is_unique, :], np.array( [ @@ -452,7 +452,7 @@ def test_design_space_hierarchical_config_space(self): x, is_acting = ds.correct_get_acting(x_cartesian) _, is_unique = np.unique(x, axis=0, return_index=True) self.assertEqual(len(is_unique), 14) - np.testing.assert_allclose( + np.testing.assert_array_equal( x[is_unique, :], np.array( [ @@ -473,7 +473,7 @@ def test_design_space_hierarchical_config_space(self): ] ), ) - np.testing.assert_allclose( + np.testing.assert_array_equal( is_acting[is_unique, :], np.array( [