call site 5 for execnet.Channel.__del__
test/testing/test_remote.py - line 19
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
   def test_exec(self): 
       o = tmpdir.ensure('remote', dir=1) 
       tfile = o.join('test_exec.py')
       tfile.write(py.code.Source("""
               def test_1():
                   assert 1 == 0 
           """))
       print py.std.sys.executable
       config = py.test.config._reparse(
                       ['--exec=' + py.std.sys.executable, 
                        o])
       cls = config._getsessionclass() 
       out = []  # out = py.std.Queue.Queue() 
       session = cls(config, out.append) 
->     session.main()
       for s in out: 
           if s.find('1 failed') != -1: 
               break 
       else: 
           py.test.fail("did not see test_1 failure") 
test/terminal/remote.py - line 82
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
   def main(self):
       rootdir = self.config.topdir 
       wasfailing = False 
       failures = []
       while 1:
           if self.config.option.looponfailing and (failures or not wasfailing): 
               while not checkpyfilechange(rootdir):
                   py.std.time.sleep(4.4)
           wasfailing = len(failures)
->         failures = self.run_remote_session(failures)
           if not self.config.option.looponfailing: 
               break
           print "#" * 60
           print "# looponfailing: mode: %d failures args" % len(failures)
           for root, names in failures:
               name = "/".join(names) # XXX
               print "Failure at: %r" % (name,) 
           print "#    watching py files below %s" % rootdir
           print "#                           ", "^" * len(str(rootdir))
       return failures
test/terminal/remote.py - line 104
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
   def run_remote_session(self, failures):
       gw, topdir = self._initslavegateway()
       channel = gw.remote_exec("""
               from py.__.test.terminal.remote import slaverun_TerminalSession
               slaverun_TerminalSession(channel) 
->         """, stdout=self.out, stderr=self.out) 
       try:
           print "MASTER: initiated slave terminal session ->"
           repr = self.config._makerepr(conftestnames=[])
           channel.send((str(topdir), repr, failures))
           print "MASTER: send start info, topdir=%s" % (topdir,)
           try:
               return channel.receive()
           except channel.RemoteError, e:
               print "*" * 70
               print "ERROR while waiting for proper slave startup"
               print "*" * 70
               print e
               return []
       finally:
           gw.exit()
execnet/gateway.py - line 286
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
   def remote_exec(self, source, stdout=None, stderr=None): 
       """ return channel object and connect it to a remote
               execution thread where the given 'source' executes
               and has the sister 'channel' object in its global 
               namespace.  The callback functions 'stdout' and 
               'stderr' get called on receival of remote 
               stdout/stderr output strings. 
           """
       try:
           source = str(Source(source))
       except NameError: 
           try: 
               import py 
               source = str(py.code.Source(source))
           except ImportError: 
               pass 
       channel = self.newchannel() 
->     outid = self._newredirectchannelid(stdout) 
       errid = self._newredirectchannelid(stderr) 
       self._send(Message.CHANNEL_OPEN(
                   channel.id, (source, outid, errid)))
       return channel