Skip to content

Commit 74e09e4

Browse files
committed
Fix tests
1 parent df81cc0 commit 74e09e4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pandas/tests/frame/methods/test_align.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def test_align_float(self, float_frame, using_copy_on_write):
107107
af, bf = float_frame.align(
108108
other.iloc[:, 0], join="inner", axis=1, method=None, fill_value=None
109109
)
110-
tm.assert_index_equal(bf.index, Index([]))
110+
tm.assert_index_equal(bf.index, Index([]).astype(bf.index.dtype))
111111

112112
msg = (
113113
"The 'method', 'limit', and 'fill_axis' keywords in DataFrame.align "
@@ -117,7 +117,7 @@ def test_align_float(self, float_frame, using_copy_on_write):
117117
af, bf = float_frame.align(
118118
other.iloc[:, 0], join="inner", axis=1, method=None, fill_value=0
119119
)
120-
tm.assert_index_equal(bf.index, Index([]))
120+
tm.assert_index_equal(bf.index, Index([]).astype(bf.index.dtype))
121121

122122
# Try to align DataFrame to Series along bad axis
123123
msg = "No axis named 2 for object type DataFrame"

pandas/tests/frame/methods/test_rank.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ def test_rank_object_first(
476476
obj = frame_or_series(["foo", "foo", None, "foo"])
477477
result = obj.rank(method="first", na_option=na_option, ascending=ascending)
478478
expected = frame_or_series(expected)
479-
if using_infer_string:
479+
if using_infer_string and isinstance(obj, Series):
480480
expected = expected.astype("uint64")
481481
tm.assert_equal(result, expected)
482482

0 commit comments

Comments
 (0)