File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -131,15 +131,19 @@ def test_column_contains_typeerror(self):
131
131
def test_tab_completion (self ):
132
132
# DataFrame whose columns are identifiers shall have them in __dir__.
133
133
df = pd .DataFrame ([list ('abcd' ), list ('efgh' )], columns = list ('ABCD' ))
134
- assert 'A' in dir (df )
134
+ for key in list ('ABCD' ):
135
+ assert key in dir (df )
135
136
assert isinstance (df .__getitem__ ('A' ), pd .Series )
136
137
137
138
# DataFrame whose first-level columns are identifiers shall have
138
139
# them in __dir__.
139
140
df = pd .DataFrame (
140
141
[list ('abcd' ), list ('efgh' )],
141
142
columns = pd .MultiIndex .from_tuples (list (zip ('ABCD' , 'EFGH' ))))
142
- assert 'A' in dir (df )
143
+ for key in list ('ABCD' ):
144
+ assert key in dir (df )
145
+ for key in list ('EFGH' ):
146
+ assert key not in dir (df )
143
147
assert isinstance (df .__getitem__ ('A' ), pd .DataFrame )
144
148
145
149
def test_not_hashable (self ):
You can’t perform that action at this time.
0 commit comments