call site 0 for io.FDCapture.done
doc/test_conftest.py - line 105
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
   def test_js_ignore():
       py.magic.autopath().dirpath('conftest.py').copy(tmpdir.join('conftest.py'))
       tmpdir.ensure('__init__.py')
       xtxt = tmpdir.join('x.txt')
       xtxt.write(py.code.Source("""
       `blah`_
   
       .. _`blah`: javascript:some_function()
       """))
       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) == 3
test/session.py - line 63
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
   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
test/session.py - line 99
71
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
   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/collect.py - line 367
366
367
   def finishcapture(self): 
->     self._config._finishcapture(self)
test/config.py - line 269
265
266
267
268
269
   def _finishcapture(self, colitem):
       if hasattr(colitem, '_capture'):
           capture = colitem._capture 
           del colitem._capture 
->         colitem._captured_out, colitem._captured_err = capture.reset()
io/stdcapture.py - line 30
24
25
26
27
28
29
30
31
   def reset(self): 
       """ reset sys.stdout and sys.stderr
   
               returns a tuple of file objects (out, err) for the captured
               data
           """
->     outfile, errfile = self.done()
       return outfile.read(), errfile.read()
io/stdcapture.py - line 63
59
60
61
62
63
64
65
66
67
68
69
70
71
   def done(self):
       """ return (outfile, errfile) and stop capturing. """
       outfile = errfile = emptyfile
       if hasattr(self, 'out'): 
->         outfile = self.out.done() 
       if hasattr(self, 'err'): 
           errfile = self.err.done() 
       if hasattr(self, '_oldin'):
           oldsys, oldfd = self._oldin 
           os.dup2(oldfd, 0)
           os.close(oldfd)
           sys.stdin = oldsys 
       return outfile, errfile