call site 0 for test.collect.Directory.__init__
test/rsession/testing/test_rsession.py - line 56
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
   def test_example_distribution_minus_x(self):
       self.source.ensure("sub", "conftest.py").write(py.code.Source("""
               dist_hosts = ['localhost:%s']
           """ % self.dest))
       self.source.ensure("sub", "__init__.py")
       self.source.ensure("sub", "test_one.py").write(py.code.Source("""
               def test_1(): 
                   pass
               def test_x():
                   import py
                   py.test.skip("aaa")
               def test_2():
                   assert 0
               def test_3():
                   raise ValueError(23)
               def test_4(someargs):
                   pass
           """))
       config = py.test.config._reparse([self.source.join("sub"), '-x'])
       rsession = RSession(config)
       allevents = []
->     rsession.main(reporter=allevents.append)
       testevents = [x for x in allevents 
                       if isinstance(x, repevent.ReceivedItemOutcome)]
       assert len(testevents) == 3
       assert rsession.checkfun()
test/rsession/rsession.py - line 146
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
   def main(self, reporter=None):
       """ main loop for running tests. """
       args = self.config.args
   
       hm = HostManager(self.config)
       reporter, startserverflag = self.init_reporter(reporter,
           hm.hosts, RemoteReporter)
       reporter, checkfun = self.wrap_reporter(reporter)
   
       reporter(repevent.TestStarted(hm.hosts, self.config.topdir,
                                     hm.roots))
   
       try:
           nodes = hm.setup_hosts(reporter)
           reporter(repevent.RsyncFinished())
           try:
->             self.dispatch_tests(nodes, reporter, checkfun)
           except (KeyboardInterrupt, SystemExit):
               print >>sys.stderr, "C-c pressed waiting for gateways to teardown..."
               channels = [node.channel for node in nodes]
               hm.kill_channels(channels)
               hm.teardown_gateways(reporter, channels)
               print >>sys.stderr, "... Done"
               raise
   
           channels = [node.channel for node in nodes]
           hm.teardown_hosts(reporter, channels, nodes, 
                             exitfirst=self.config.option.exitfirst)
           reporter(repevent.Nodes(nodes))
           retval = reporter(repevent.TestFinished())
           self.kill_server(startserverflag)
           return retval
       except (KeyboardInterrupt, SystemExit):
           reporter(repevent.InterruptedExecution())
           self.kill_server(startserverflag)
           raise
       except:
           reporter(repevent.CrashedExecution())
           self.kill_server(startserverflag)
           raise
test/rsession/rsession.py - line 172
171
172
173
174
175
176
   def dispatch_tests(self, nodes, reporter, checkfun):
->     colitems = self.config.getcolitems()
       keyword = self.config.option.keyword
       itemgenerator = itemgen(colitems, reporter, keyword, self.reporterror)
           
       all_tests = dispatch_loop(nodes, itemgenerator, checkfun)
test/config.py - line 65
62
63
64
65
   def getcolitems(self):
       """ return initial collectors. """
       trails = getattr(self, '_coltrails', None)
->     return [self._getcollector(path) for path in (trails or self.args)]
test/config.py - line 75
67
68
69
70
71
72
73
74
75
76
77
   def _getcollector(self, path):
       if isinstance(path, tuple):
           relpath, names = path
           fspath = self.topdir.join(relpath)
           col = self._getcollector(fspath)
       else:
           path = py.path.local(path)
           assert path.check(), "%s: path does not exist" %(path,)
->         col = self._getrootcollector(path)
           names = path.relto(col.fspath).split(path.sep)
       return col._getitembynames(names)
test/config.py - line 83
79
80
81
82
83
84
85
   def _getrootcollector(self, path):
       pkgpath = path.pypkgpath()
       if pkgpath is None:
           pkgpath = path.check(file=1) and path.dirpath() or path
->     col = self._conftest.rget("Directory", pkgpath)(pkgpath)
       col._config = self
       return col