Skip to content

Commit

Permalink
TST: extend test and add issue reference
Browse files Browse the repository at this point in the history
  • Loading branch information
tacaswell committed Aug 10, 2017
1 parent 9f54354 commit 47947db
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions pandas/tests/frame/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,9 +165,13 @@ def test_iteritems(self):
assert type(v) == Series

def test_items(self):
df = DataFrame([[1, 2, 3], [4, 5, 6]], columns=['a', 'a', 'b'])
for k, v in df.items():
# issue #17213, #13918
cols = ['a', 'b', 'c']
df = DataFrame([[1, 2, 3], [4, 5, 6]], columns=cols)
for c, (k, v) in zip(cols, df.items()):
assert c == k
assert type(v) == Series
assert (df[k] == v).all()

def test_iter(self):
assert tm.equalContents(list(self.frame), self.frame.columns)
Expand Down

0 comments on commit 47947db

Please sign in to comment.