Skip to content

Commit f6d564d

Browse files
committed
make dates comparable
1 parent 53f0d0c commit f6d564d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_delphi_utils_python/tests/validator/test_dynamic.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def test_half_padding(self):
4848
ref_df, test_df, ref_date, ref_date)
4949

5050
# Check it only takes missing dates - so the last 5 dates
51-
assert new_ref_df.time_value.max() == datetime.strptime("2021-01-11",
51+
assert new_ref_df.time_value.max().date() == datetime.strptime("2021-01-11",
5252
"%Y-%m-%d").date()
5353
assert new_ref_df.shape[0] == 11
5454
assert new_ref_df["val"].iloc[5] == 2
@@ -71,7 +71,7 @@ def test_full_padding(self):
7171
ref_df, test_df, ref_date, ref_date)
7272

7373
# Check it only takes missing dates up to the day before the reference
74-
assert new_ref_df.time_value.max() == datetime.strptime("2021-01-15",
74+
assert new_ref_df.time_value.max().date() == datetime.strptime("2021-01-15",
7575
"%Y-%m-%d").date()
7676
assert new_ref_df.shape[0] == 15
7777
assert new_ref_df["val"].iloc[5] == 2

0 commit comments

Comments
 (0)