call site 2 for io.dupfile
doc/test_conftest.py - line 86
79
80
81
82
83
84
85
86
87
88
89
90
91
92
   def test_doctest_indentation():
       # XXX get rid of the next line: 
       py.magic.autopath().dirpath('conftest.py').copy(tmpdir.join('conftest.py'))
   
       txt = tmpdir.join('foo.txt')
       txt.write('..\n  >>> print "foo\\n  bar"\n  foo\n    bar\n')
       config = py.test.config._reparse([txt])
->     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/config.py - line 140
137
138
139
140
141
142
   def initsession(self):
       """ return an initialized session object. """
       cls = self._getsessionclass()
->     session = cls(self)
       session.fixoptions()
       return session
test/terminal/terminal.py - line 27
22
23
24
25
26
27
28
29
   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._opencollectors = []
       self.presenter = Presenter(self.out, config)
test/terminal/out.py - line 90
78
79
80
81
82
83
84
85
86
87
88
89
90
   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'):
           file = WriteFile(file.send) 
       elif callable(file):
           file = WriteFile(file)
       if hasattr(file, 'isatty') and file.isatty(): 
           return TerminalOut(file)
       else:
->         return FileOut(file)
test/terminal/out.py - line 11
10
11
   def __init__(self, file):
->     self.file = py.io.dupfile(file)