Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Paul-Saves committed Nov 15, 2023
1 parent fdecdea commit bdc0fd8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
6 changes: 0 additions & 6 deletions smt/applications/tests/test_mixed_integer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
8 changes: 4 additions & 4 deletions smt/utils/test/test_design_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
Expand Down Expand Up @@ -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(
[
Expand Down Expand Up @@ -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(
[
Expand All @@ -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(
[
Expand Down

0 comments on commit bdc0fd8

Please sign in to comment.