call site 0 for path.local.__eq__
doc/test_conftest.py - line 19
8
9
10
11
12
13
14
15
16
17
18
19
20
21
   def test_doctest_extra_exec(): 
       # XXX get rid of the next line: 
       py.magic.autopath().dirpath('conftest.py').copy(tmpdir.join('conftest.py'))
       xtxt = tmpdir.join('y.txt')
       xtxt.write(py.code.Source("""
           hello::
               .. >>> raise ValueError 
                  >>> None
       """))
       config = py.test.config._reparse([xtxt]) 
       session = config.initsession()
->     session.main()
       l = session.getitemoutcomepairs(Failed) 
       assert len(l) == 1
test/session.py - line 63
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/session.py - line 84
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
   def runtraced(self, colitem):
       if self.shouldclose(): 
           raise Exit, "received external close signal" 
   
       outcome = None 
       colitem.startcapture() 
       try: 
           self.start(colitem)
           try: 
               try:
                   if colitem._stickyfailure: 
                       raise colitem._stickyfailure 
->                 outcome = self.run(colitem) 
               except (KeyboardInterrupt, Exit): 
                   raise 
               except Outcome, outcome: 
                   if outcome.excinfo is None: 
                       outcome.excinfo = py.code.ExceptionInfo() 
               except: 
                   excinfo = py.code.ExceptionInfo() 
                   outcome = Failed(excinfo=excinfo) 
               assert (outcome is None or 
                       isinstance(outcome, (list, Outcome)))
           finally: 
               self.finish(colitem, outcome) 
           if isinstance(outcome, Failed) and self.config.option.exitfirst:
               py.test.exit("exit on first problem configured.", item=colitem)
       finally: 
           colitem.finishcapture()
test/session.py - line 119
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
   def run(self, colitem): 
       if self.config.option.collectonly and isinstance(colitem, py.test.collect.Item): 
           return 
       if isinstance(colitem, py.test.collect.Item): 
           colitem._skipbykeyword(self.config.option.keyword)
       res = colitem.run() 
       if res is None: 
           return Passed() 
       elif not isinstance(res, (list, tuple)): 
           raise TypeError("%r.run() returned neither "
                           "list, tuple nor None: %r" % (colitem, res))
       else: 
           finish = self.startiteration(colitem, res)
           try: 
               for name in res: 
                   obj = colitem.join(name) 
                   assert obj is not None 
->                 self.runtraced(obj) 
           finally: 
               if finish: 
                   finish() 
       return res 
test/session.py - line 77
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
   def runtraced(self, colitem):
       if self.shouldclose(): 
           raise Exit, "received external close signal" 
   
       outcome = None 
->     colitem.startcapture() 
       try: 
           self.start(colitem)
           try: 
               try:
                   if colitem._stickyfailure: 
                       raise colitem._stickyfailure 
                   outcome = self.run(colitem) 
               except (KeyboardInterrupt, Exit): 
                   raise 
               except Outcome, outcome: 
                   if outcome.excinfo is None: 
                       outcome.excinfo = py.code.ExceptionInfo() 
               except: 
                   excinfo = py.code.ExceptionInfo() 
                   outcome = Failed(excinfo=excinfo) 
               assert (outcome is None or 
                       isinstance(outcome, (list, Outcome)))
           finally: 
               self.finish(colitem, outcome) 
           if isinstance(outcome, Failed) and self.config.option.exitfirst:
               py.test.exit("exit on first problem configured.", item=colitem)
       finally: 
           colitem.finishcapture()
test/item.py - line 36
35
36
   def startcapture(self): 
->     self._config._startcapture(self, path=self.fspath)
test/config.py - line 256
253
254
255
256
257
258
259
260
261
262
263
   def _startcapture(self, colitem, path=None):
       if not self.option.nocapture:
           assert not hasattr(colitem, '_capture')
->         iocapture = self.getvalue("conf_iocapture", path=path)
           if iocapture == "fd": 
               capture = py.io.StdCaptureFD()
           elif iocapture == "sys":
               capture = py.io.StdCapture()
           else:
               raise ValueError("unknown io capturing: " + iocapture)
           colitem._capture = capture
test/config.py - line 135
125
126
127
128
129
130
131
132
133
134
135
   def getvalue(self, name, path=None): 
       """ return 'name' value looked up from the 'options'
               and then from the first conftest file found up 
               the path (including the path itself). 
               if path is None, lookup the value in the initial
               conftest modules found during command line parsing. 
           """
       try:
           return getattr(self.option, name)
       except AttributeError:
->         return self._conftest.rget(name, path)
test/conftesthandle.py - line 55
54
55
56
   def rget(self, name, path=None):
->     mod, value = self.rget_with_confmod(name, path)
       return value
test/conftesthandle.py - line 59
58
59
60
61
62
63
64
65
66
   def rget_with_confmod(self, name, path=None):
->     modules = self.getconftestmodules(path)
       modules.reverse()
       for mod in modules:
           try:
               return mod, getattr(mod, name)
           except AttributeError:
               continue
       raise KeyError, name
test/conftesthandle.py - line 40
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
   def getconftestmodules(self, path):
       """ return a list of imported conftest modules for the given path.  """ 
       try:
->         clist = self._path2confmods[path]
       except KeyError:
           dp = path.dirpath()
           if dp == path: 
               return [importconfig(defaultconftestpath)]
           clist = self.getconftestmodules(dp)
           conftestpath = path.join("conftest.py")
           if conftestpath.check(file=1):
               clist.append(importconfig(conftestpath))
           self._path2confmods[path] = clist
       # be defensive: avoid changes from caller side to
       # affect us by always returning a copy of the actual list 
       return clist[:]