Skip to content

Commit 892c3e3

Browse files
committed
fix tests
1 parent 101b4d2 commit 892c3e3

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

pandas/tests/frame/test_alter_axes.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -667,10 +667,10 @@ def test_rename(self, float_frame):
667667
# gets sorted alphabetical
668668
df = DataFrame(data)
669669
renamed = df.rename(index={"foo": "bar", "bar": "foo"})
670-
tm.assert_index_equal(renamed.index, Index(["foo", "bar"]))
670+
tm.assert_index_equal(renamed.index, Index(["bar", "foo"]))
671671

672672
renamed = df.rename(index=str.upper)
673-
tm.assert_index_equal(renamed.index, Index(["BAR", "FOO"]))
673+
tm.assert_index_equal(renamed.index, Index(["FOO", "BAR"]))
674674

675675
# have to pass something
676676
with pytest.raises(TypeError, match="must pass an index to rename"):

pandas/tests/indexing/multiindex/test_setitem.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def test_multiindex_setitem(self):
159159
)
160160

161161
expected = df_orig.copy()
162-
expected.iloc[[0, 2, 3]] *= 2
162+
expected.iloc[[0, 1, 3]] *= 2
163163

164164
idx = pd.IndexSlice
165165
df = df_orig.copy()

pandas/tests/io/json/test_pandas.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ def test_roundtrip_simple(self, orient, convert_axes, numpy, dtype):
168168

169169
expected = self.frame.copy()
170170

171-
if not numpy and (orient == "index" or (PY35 and orient == "columns")):
171+
if not numpy and (PY35 and (orient == "index" or orient == "columns")):
172172
# TODO: debug why sort is required
173173
expected = expected.sort_index()
174174

@@ -188,7 +188,7 @@ def test_roundtrip_intframe(self, orient, convert_axes, numpy, dtype):
188188
data, orient=orient, convert_axes=convert_axes, numpy=numpy, dtype=dtype
189189
)
190190
expected = self.intframe.copy()
191-
if not numpy and (orient == "index" or (PY35 and orient == "columns")):
191+
if not numpy and (PY35 and (orient == "index" or orient == "columns")):
192192
expected = expected.sort_index()
193193

194194
if orient == "records" or orient == "values":
@@ -228,7 +228,7 @@ def test_roundtrip_str_axes(self, orient, convert_axes, numpy, dtype):
228228
)
229229

230230
expected = df.copy()
231-
if not numpy and (orient == "index" or (PY35 and orient == "columns")):
231+
if not numpy and (PY35 and (orient == "index" or orient == "columns")):
232232
expected = expected.sort_index()
233233

234234
if not dtype:

0 commit comments

Comments
 (0)