call site 2 for test.collect.Class.__init__
doc/test_conftest.py - line 48
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
   def test_doctest_basic(): 
       # XXX get rid of the next line: 
       py.magic.autopath().dirpath('conftest.py').copy(tmpdir.join('conftest.py'))
   
       xtxt = tmpdir.join('x.txt')
       xtxt.write(py.code.Source("""
           .. 
              >>> from os.path import abspath 
   
           hello world 
   
              >>> assert abspath 
              >>> i=3
              >>> print i
              3
   
           yes yes
   
               >>> i
               3
   
           end
       """))
       config = py.test.config._reparse([xtxt]) 
       session = config.initsession()
->     session.main()
       l = session.getitemoutcomepairs(Failed)
       assert len(l) == 0 
       l = session.getitemoutcomepairs(Passed)
       l2 = session.getitemoutcomepairs(Skipped)
       assert len(l+l2) == 2
test/session.py - line 57
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
   def main(self): 
       """ main loop for running tests. """
->     colitems = self.config.getcolitems()
       try:
           self.header(colitems) 
           try:
               try:
                   for colitem in colitems: 
                       self.runtraced(colitem)
               except KeyboardInterrupt: 
                   raise 
           finally: 
               self.footer(colitems) 
       except Exit, ex:
           pass
       return self.getitemoutcomepairs(Failed)
test/config.py - line 65
62
63
64
65
   def getcolitems(self):
       """ return initial collectors. """
       trails = getattr(self, '_coltrails', None)
->     return [self._getcollector(path) for path in (trails or self.args)]
test/config.py - line 75
67
68
69
70
71
72
73
74
75
76
77
   def _getcollector(self, path):
       if isinstance(path, tuple):
           relpath, names = path
           fspath = self.topdir.join(relpath)
           col = self._getcollector(fspath)
       else:
           path = py.path.local(path)
           assert path.check(), "%s: path does not exist" %(path,)
->         col = self._getrootcollector(path)
           names = path.relto(col.fspath).split(path.sep)
       return col._getitembynames(names)
test/config.py - line 83
79
80
81
82
83
84
85
   def _getrootcollector(self, path):
       pkgpath = path.pypkgpath()
       if pkgpath is None:
           pkgpath = path.check(file=1) and path.dirpath() or path
->     col = self._conftest.rget("Directory", pkgpath)(pkgpath)
       col._config = self
       return col 
test/collect.py - line 244
242
243
244
245
   def __init__(self, fspath, parent=None): 
       fspath = py.path.local(fspath) 
->     super(FSCollector, self).__init__(fspath.basename, parent) 
       self.fspath = fspath