call site 2 for execnet.Channel.__del__
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 143
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/hostmanage.py - line 157
156
157
158
159
160
161
162
163
   def setup_hosts(self, reporter):
->     self.init_rsync(reporter)
       nodes = []
       for host in self.hosts:
           if hasattr(host.gw, 'remote_exec'): # otherwise dummy for tests :/
               ch = setup_slave(host, self.config)
               nodes.append(MasterNode(ch, reporter))
       return nodes