Skip to content

Commit

Permalink
TST: extend existing iteritems test
Browse files Browse the repository at this point in the history
  • Loading branch information
tacaswell committed Aug 10, 2017
1 parent 35860fa commit a551d10
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pandas/tests/frame/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,12 @@ def test_nonzero(self):
assert not df.empty

def test_iteritems(self):
df = DataFrame([[1, 2, 3], [4, 5, 6]], columns=['a', 'a', 'b'])
for k, v in compat.iteritems(df):
cols = ['a', 'a', 'b']
df = DataFrame([[1, 2, 3], [4, 5, 6]], columns=cols)
for c, (k, v) in zip(cols, compat.iteritems(df)):
assert c == k
assert type(v) == Series
assert df[k] == v

def test_items(self):
# issue #17213
Expand Down

0 comments on commit a551d10

Please sign in to comment.