call site 0 for test.collect.DoctestFile.__init__
test/testing/test_doctest.py - line 40
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
   def test_collect_doctest_files_with_test_prefix():
       o = py.test.ensuretemp("testdoctest")
       checkfile = o.ensure("test_something.txt")
       o.ensure("whatever.txt")
       checkfile.write(py.code.Source("""
           alskdjalsdk
           >>> i = 5
           >>> i-1
           4
       """))
       for x in (o, checkfile): 
           #print "checking that %s returns custom items" % (x,) 
           config = py.test.config._reparse([x])
           col = config._getcollector(x)
->         items = list(col._tryiter(py.test.collect.Item))
           assert len(items) == 1
           assert isinstance(items[0], DoctestText)
test/collect.py - line 216
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
222
223
224
   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 285
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
   def join(self, name):
       name2items = self.__dict__.setdefault('_name2items', {})
       try:
           res = name2items[name]
       except KeyError:
           p = self.fspath.join(name)
           res = None
           if p.check(file=1): 
               if p.ext == '.py':
                   res = self.Module(p, parent=self) 
               elif p.ext == '.txt':
->                 res = self.DoctestFile(p, parent=self)
           elif p.check(dir=1): 
               Directory = py.test.config.getvalue('Directory', p) 
               res = Directory(p, parent=self) 
           name2items[name] = res 
       return res