call site 0 for test.collect.Function.__hash__
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 176
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/rsession/master.py - line 60
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
   def dispatch_loop(masternodes, itemgenerator, shouldstop, 
                     waiter = lambda: py.std.time.sleep(0.1),
                     max_tasks_per_node=None):
       if not max_tasks_per_node:
           max_tasks_per_node = py.test.config.getvalue("dist_taskspernode")
       all_tests = {}
       while 1:
           try:
               for node in masternodes:
                   if len(node.pending) < max_tasks_per_node:
                       item = itemgenerator.next()
->                     all_tests[item] = True
                       if shouldstop():
                           for _node in masternodes:
                               _node.send(StopIteration) # magic connector
                           return None
                       node.send(item)
           except StopIteration:
               break
           waiter()
       return all_tests