call site 0 for test.collect.Directory.filefilter
test/testing/test_collect.py - line 47
41
42
43
44
45
46
47
48
49
50
51
   def test_found_certain_testfiles(): 
       tmp = py.test.ensuretemp("found_certain_testfiles")
       tmp.ensure('test_found.py')
       tmp.ensure('found_test.py')
   
       colitem = py.test.collect.Directory(tmp) 
->     items = list(colitem._tryiter(py.test.collect.Module))
       assert len(items) == 2
       items = [item.name for item in items]
       assert 'test_found.py' in items
       assert 'found_test.py' in items
test/collect.py - line 212
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
   def _tryiter(self, yieldtype=None, reporterror=None, keyword=None):
       """ yield stop item instances from flattening the collector. 
               XXX deprecated: this way of iteration is not safe in all
               cases. 
           """ 
       if yieldtype is None: 
           yieldtype = py.test.collect.Item 
       if isinstance(self, yieldtype):
           try:
               self._skipbykeyword(keyword)
               yield self
           except Skipped:
               if reporterror is not None:
                   excinfo = py.code.ExceptionInfo()
                   reporterror((excinfo, self))
       else:
           if not isinstance(self, py.test.collect.Item):
               try:
                   if reporterror is not None:
                       reporterror((None, self))
->                 for x in self.run(): 
                       for y in self.join(x)._tryiter(yieldtype, 
                                           reporterror, keyword): 
                           yield y
               except KeyboardInterrupt:
                   raise
               except: 
                   if reporterror is not None: 
                       excinfo = py.code.ExceptionInfo()
                       reporterror((excinfo, self)) 
test/collect.py - line 263
259
260
261
262
263
264
265
266
267
268
269
   def run(self):
       files = []
       dirs = []
       for p in self.fspath.listdir():
->         if self.filefilter(p):
               files.append(p.basename)
           elif self.recfilter(p):
               dirs.append(p.basename) 
       files.sort()
       dirs.sort()
       return files + dirs