File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 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):
131131 def test_tab_completion (self ):
132132 # DataFrame whose columns are identifiers shall have them in __dir__.
133133 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 )
135136 assert isinstance (df .__getitem__ ('A' ), pd .Series )
136137
137138 # DataFrame whose first-level columns are identifiers shall have
138139 # them in __dir__.
139140 df = pd .DataFrame (
140141 [list ('abcd' ), list ('efgh' )],
141142 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 )
143147 assert isinstance (df .__getitem__ ('A' ), pd .DataFrame )
144148
145149 def test_not_hashable (self ):
You can’t perform that action at this time.
0 commit comments