Skip to content

Commit 61ab68c

Browse files
author
Sumanau Sareen
committed
1. Use proper variable names in tests. 2. Moved changelog to correct subsection. 3. Update another failing test
1 parent 830ca39 commit 61ab68c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pandas/tests/indexing/test_indexing.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -718,11 +718,11 @@ def test_index_type_coercion(self):
718718
assert s2.index.is_object()
719719

720720
def test_empty_index_for_empty_dataframe(self):
721-
index=pd.Index([], name='idx')
722-
df = pd.DataFrame(columns=['A'], index=index)
723-
df2 = df.copy()
724-
df['A'] = []
725-
tm.assert_index_equal(df.index, df2.index)
721+
index = pd.Index([], name='idx')
722+
result = pd.DataFrame(columns=['A'], index=index)
723+
result['A'] = []
724+
expected = pd.DataFrame(columns=['A'], index=index)
725+
tm.assert_index_equal(result.index, expected.index)
726726

727727

728728
class TestMisc(Base):

pandas/tests/indexing/test_partial.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def test_partial_set_empty_frame(self):
451451
# these work as they don't really change
452452
# anything but the index
453453
# GH5632
454-
expected = DataFrame(columns=['foo'], index=Index([]))
454+
expected = DataFrame(columns=['foo'], index=Index([], dtype='int64'))
455455

456456
def f():
457457
df = DataFrame()

0 commit comments

Comments
 (0)