traceback for io.dupfile

/home/johnny/projects/merlinux/py/dist/py/test/terminal/out.py:10

   def __init__(self, file):
->     self.file = py.io.dupfile(file)

/home/johnny/projects/merlinux/py/dist/py/test/terminal/out.py:91

   def getout(file):
       # XXX investigate further into terminal output, this is not enough
       #
       if file is None: 
           file = py.std.sys.stdout 
       elif hasattr(file, 'send'):  # likely a channel like thing
           file = WriteFile(file.send) 
       if hasattr(file, 'isatty') and file.isatty(): 
           return TerminalOut(file)
       else:
->         return FileOut(file)

/home/johnny/projects/merlinux/py/dist/py/test/terminal/terminal.py:25

   def __init__(self, config, file=None): 
       super(TerminalSession, self).__init__(config) 
       if file is None: 
           file = py.std.sys.stdout 
       self._file = file
->     self.out = getout(file) 
       self._started = {}
       self._opencollectors = []

/home/johnny/projects/merlinux/py/dist/py/documentation/test_conftest.py:50

   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, args = py.test.Config.parse([str(xtxt)]) 
->     session = config.getsessionclass()(config, py.std.sys.stdout)
       session.main([xtxt]) 
       l = session.getitemoutcomepairs(py.test.Item.Failed)
       assert len(l) == 0 
       l = session.getitemoutcomepairs(py.test.Item.Passed)
       l2 = session.getitemoutcomepairs(py.test.Item.Skipped)
       assert len(l+l2) == 3

/home/johnny/projects/merlinux/py/dist/py/test/item.py:79

   def execute(self, target, *args):
       """ default implementation for calling a test target is to
               simply call it.
           """
->     target(*args)

/home/johnny/projects/merlinux/py/dist/py/test/item.py:73

   def run(self):
       self.state.prepare(self) 
->     self.execute(self.obj, *self.args)

/home/johnny/projects/merlinux/py/dist/py/test/rsession/executor.py:22

   def execute(self):
       try:
->         self.item.run()
           outcome = Outcome()
       except py.test.Item.Skipped, e: 
           outcome = Outcome(skipped=str(e))
       except (KeyboardInterrupt, SystemExit):
           raise
       except:
           excinfo = py.code.ExceptionInfo()
           if isinstance(self.item, py.test.Function): 
               fun = self.item.obj # hope this is stable 
               code = py.code.Code(fun)
               excinfo.traceback = excinfo.traceback.cut(
                       path=code.path, firstlineno=code.firstlineno)
           outcome = Outcome(excinfo=excinfo, setupfailure=False)
           if self.usepdb:
               if self.reporter is not None:
                   self.reporter(report.ImmediateFailure(self.item,
                       ReprOutcome(outcome.make_repr())))
               import pdb
               pdb.post_mortem(excinfo._excinfo[2])
               # XXX hmm, we probably will not like to continue from that point
               # or we do?
               raise SystemExit()
       outcome.stdout = ""
       outcome.stderr = ""
       return outcome

/home/johnny/projects/merlinux/py/dist/py/test/rsession/local.py:31

   def plain_runner(item, session, reporter):
       # box executor is doing stdout/err catching for us, let's do it here
       startcapture(session)
       r = RunExecutor(item, usepdb=session.config.option.usepdb, reporter=reporter)
->     outcome = r.execute()
       outcome = ReprOutcome(outcome.make_repr())
       outcome.stdout, outcome.stderr = finishcapture(session)
       return outcome

/home/johnny/projects/merlinux/py/dist/py/test/rsession/local.py:47

   def apigen_runner(item, session, reporter):
       r = RunExecutor(item, reporter=reporter)
       session.tracer.start_tracing()
->     retval = plain_runner(item, session, reporter)
       session.tracer.end_tracing()
       return retval