From e453c5bc7e5f1cbaac0ee6240793414e8467384a Mon Sep 17 00:00:00 2001 From: dsweber2 Date: Fri, 10 May 2024 17:47:33 -0500 Subject: [PATCH] updates borked old tests, caught by @dshemetov --- _delphi_utils_python/tests/test_weekday.py | 24 +++++----------------- 1 file changed, 5 insertions(+), 19 deletions(-) diff --git a/_delphi_utils_python/tests/test_weekday.py b/_delphi_utils_python/tests/test_weekday.py index 52e6f4f7e..cf27207b1 100644 --- a/_delphi_utils_python/tests/test_weekday.py +++ b/_delphi_utils_python/tests/test_weekday.py @@ -18,24 +18,10 @@ def test_get_params(self): result = Weekday.get_params(self.TEST_DATA, "den", ["num"], "date", [1], TEST_LOGGER) print(result) - expected_result = [ - -0.05993665, - -0.0727396, - -0.05618517, - 0.0343405, - 0.12534997, - 0.04561813, - -2.27669028, - -1.89564374, - -1.5695407, - -1.29838116, - -1.08216513, - -0.92089259, - -0.81456355, - -0.76317802, - -0.76673598, - -0.82523745, - ] + expected_result = np.array([[-0.05998306, -0.07269935, -0.05603804, 0.03437098, 0.12530953, + 0.04554737, -2.27674403, -1.89568887, -1.56957556, -1.29840412, + -1.08217453, -0.9208868 , -0.81454092, -0.76313691, -0.76667475, + -0.82515445]]) assert np.allclose(result, expected_result) def test_calc_adjustment_with_zero_parameters(self): @@ -71,4 +57,4 @@ def test_calc_adjustment(self): # The date and "den" column are unchanged by this function assert np.allclose(result["num"].values, expected_nums) assert np.allclose(result["den"].values, self.TEST_DATA["den"].values) - assert np.array_equal(result["date"].values, self.TEST_DATA["date"].values) \ No newline at end of file + assert np.array_equal(result["date"].values, self.TEST_DATA["date"].values)