Skip to content

Commit 4c2cbb7

Browse files
committed
chore: some pandas-nightly fixes
1 parent 63c5022 commit 4c2cbb7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ def assert_equal_data(result: Any, expected: Mapping[str, Any]) -> None:
118118
are_equivalent_values = rhs is not None and math.isclose(
119119
lhs, rhs, rel_tol=0, abs_tol=1e-6
120120
)
121+
elif pd.isna(lhs):
122+
are_equivalent_values = pd.isna(rhs)
121123
elif isinstance(lhs, float) and math.isnan(lhs):
122124
are_equivalent_values = rhs is None or math.isnan(rhs)
123125
elif isinstance(rhs, float) and math.isnan(rhs):
@@ -128,8 +130,6 @@ def assert_equal_data(result: Any, expected: Mapping[str, Any]) -> None:
128130
are_equivalent_values = all(
129131
left_side == right_side for left_side, right_side in zip(lhs, rhs)
130132
)
131-
elif pd.isna(lhs):
132-
are_equivalent_values = pd.isna(rhs)
133133
elif type(lhs) is date and type(rhs) is datetime:
134134
are_equivalent_values = datetime(lhs.year, lhs.month, lhs.day) == rhs
135135
elif (

0 commit comments

Comments
 (0)