call site 3 for execnet.PopenGateway.__init__
test/rsession/testing/test_hostmanage.py - line 256
251
252
253
254
255
256
257
258
259
260
261
   def test_hostmanage_optimise_localhost(self):
       hosts = [HostInfo("localhost") for i in range(3)]
       config = py.test.config._reparse([self.source])
       hm = HostManager(config, hosts=hosts)
       events = []
->     hm.init_rsync(events.append)
       for host in hosts:
           assert host.inplacelocal
           assert host.gw_remotepath is None
           assert not host.relpath 
       assert events
test/rsession/hostmanage.py - line 143
141
142
143
144
145
146
147
148
149
150
151
152
153
154
   def init_rsync(self, reporter):
       ignores = self.config.getvalue_pathlist("dist_rsync_ignore")
->     self.prepare_gateways(reporter)
       # send each rsync root
       for root in self.roots:
           rsync = HostRSync(root, ignores=ignores, 
                             verbose=self.config.option.verbose)
           if self._addrel: 
               destrelpath = ""
           else:
               destrelpath = root.basename
           for host in self.hosts:
               rsync.add_target_host(host, destrelpath, reporter)
           rsync.send(raises=False)
test/rsession/hostmanage.py - line 137
134
135
136
137
138
139
   def prepare_gateways(self, reporter):
       python = self.config.getvalue("dist_remotepython")
       for host in self.hosts:
->         host.initgateway(python=python)
           reporter(repevent.HostGatewayReady(host, self.roots))
           host.gw.host = host
test/rsession/hostmanage.py - line 41
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
   def initgateway(self, python="python"):
       if self.hostname == "localhost":
->         self.gw = py.execnet.PopenGateway(python=python)
       else:
           self.gw = py.execnet.SshGateway(self.hostname, 
                                           remotepython=python)
       if self.inplacelocal:
           self.gw.remote_exec(py.code.Source(
               sethomedir, "sethomedir()"
           )).waitclose()
           self.gw_remotepath = None
       else:
           assert self.relpath
           channel = self.gw.remote_exec(py.code.Source(
               gethomedir,
               sethomedir, "sethomedir()", 
               getpath_relto_home, """
                   channel.send(getpath_relto_home(%r))
               """ % self.relpath,
           ))
           self.gw_remotepath = channel.receive()