Skip to content

Commit

Permalink
updates borked old tests, caught by @dshemetov
Browse files Browse the repository at this point in the history
  • Loading branch information
dsweber2 authored and dshemetov committed May 15, 2024
1 parent 65c2d46 commit e453c5b
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions _delphi_utils_python/tests/test_weekday.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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)
assert np.array_equal(result["date"].values, self.TEST_DATA["date"].values)

0 comments on commit e453c5b

Please sign in to comment.