From b66b51cf36eb4e235db6d206ae3f706a6865b8e3 Mon Sep 17 00:00:00 2001 From: rettigl Date: Sat, 13 May 2023 23:21:10 +0200 Subject: [PATCH] add array comparison with np.testing.assert_array_equal --- tests/test_binning.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/test_binning.py b/tests/test_binning.py index b7f46a6e..ac0c2105 100644 --- a/tests/test_binning.py +++ b/tests/test_binning.py @@ -298,8 +298,9 @@ def test_simplify_binning_arguments( axes_, ranges_, ) - # for (bin_, bin__) in zip(bins__, bin_centers): - # np.testing.assert_array_equal(bin_, bin__) - assert bins__ == bins_expected - assert axes__ == axes_expected - assert ranges__ == ranges_expected + + for i, bin_ in enumerate(bins__): + np.testing.assert_array_equal(bin_, bins_expected[i]) + np.testing.assert_array_equal(axes__[i], axes_expected[i]) + if ranges__: + np.testing.assert_array_equal(ranges__[i], ranges_expected[i])