call site 20 for test.collect.Directory.__init__
test/rsession/testing/test_reporter.py - line 140
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
   def test_failed_to_load(self):
       tmpdir = py.test.ensuretemp("failedtoload")
       tmpdir.ensure("__init__.py")
       tmpdir.ensure("test_three.py").write(py.code.Source("""
           sadsadsa
           """))
       def boxfun():
           config = py.test.config._reparse([str(tmpdir)])
           rootcol = py.test.collect.Directory(tmpdir)
           host = HostInfo('localhost')
           r = self.reporter(config, [host])
           r.report(repevent.TestStarted([host], config.topdir, ["a"]))
           r.report(repevent.RsyncFinished())
           list(rootcol._tryiter(reporterror=lambda x : AbstractSession.reporterror(r.report, x)))
           r.report(repevent.TestFinished())
           return r
           
       cap = py.io.StdCaptureFD()
->     r = boxfun()
       out, err = cap.reset()
       assert not err
       assert out.find("1 failed in") != -1
       assert out.find("NameError: name 'sadsadsa' is not defined") != -1
test/rsession/testing/test_reporter.py - line 130
128
129
130
131
132
133
134
135
136
137
   def boxfun():
       config = py.test.config._reparse([str(tmpdir)])
->     rootcol = py.test.collect.Directory(tmpdir)
       host = HostInfo('localhost')
       r = self.reporter(config, [host])
       r.report(repevent.TestStarted([host], config.topdir, ["a"]))
       r.report(repevent.RsyncFinished())
       list(rootcol._tryiter(reporterror=lambda x : AbstractSession.reporterror(r.report, x)))
       r.report(repevent.TestFinished())
       return r