Skip to content

Commit a551d10

Browse files
committed
TST: extend existing iteritems test
1 parent 35860fa commit a551d10

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pandas/tests/frame/test_api.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,12 @@ def test_nonzero(self):
160160
assert not df.empty
161161

162162
def test_iteritems(self):
163-
df = DataFrame([[1, 2, 3], [4, 5, 6]], columns=['a', 'a', 'b'])
164-
for k, v in compat.iteritems(df):
163+
cols = ['a', 'a', 'b']
164+
df = DataFrame([[1, 2, 3], [4, 5, 6]], columns=cols)
165+
for c, (k, v) in zip(cols, compat.iteritems(df)):
166+
assert c == k
165167
assert type(v) == Series
168+
assert df[k] == v
166169

167170
def test_items(self):
168171
# issue #17213

0 commit comments

Comments
 (0)