call site 3 for path.local.readlines
test/testing/test_collect.py - line 340
332
333
334
335
336
337
338
339
340
341
342
   def test_documentation_virtual_collector_interaction():
       rootdir = py.path.local(py.__file__).dirpath("doc")
       # HACK 
       from py.__.doc import conftest as conf
       old = conf.option.forcegen
       try:
           conf.option.forcegen = 1
           col = py.test.collect.Directory(rootdir)
->         x = list(col._tryiter(yieldtype=py.test.collect.Function))
       finally:
           conf.option.forcegen = old
test/collect.py - line 214
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 214
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 214
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 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)) 
doc/conftest.py - line 154
152
153
154
155
156
   def run(self): 
       l = []
->     for call, tryfn, path, lineno in genlinkchecks(self.fspath): 
           l.append(tryfn) 
       return l
doc/conftest.py - line 192
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
   def genlinkchecks(path): 
->     for lineno, line in py.builtin.enumerate(path.readlines()): 
           line = line.strip()
           if line.startswith('.. _'): 
               if line.startswith('.. _`'):
                   delim = '`:'
               else:
                   delim = ':'
               l = line.split(delim, 1)
               if len(l) != 2: 
                   continue
               tryfn = l[1].strip() 
               if tryfn.startswith('http:') or tryfn.startswith('https'): 
                   if option.checkremote: 
                       yield urlcheck, tryfn, path, lineno 
               elif tryfn.startswith('webcal:'):
                   continue
               else: 
                   i = tryfn.find('#') 
                   if i != -1: 
                       checkfn = tryfn[:i]
                   else: 
                       checkfn = tryfn 
                   if checkfn.strip() and (1 or checkfn.endswith('.html')): 
                       yield localrefcheck, tryfn, path, lineno