diff --git a/py/execnet/testing/test_gwmanage.py b/py/execnet/testing/test_gwmanage.py index 34acf38a8..1c5f6465b 100644 --- a/py/execnet/testing/test_gwmanage.py +++ b/py/execnet/testing/test_gwmanage.py @@ -77,7 +77,7 @@ class TestGatewayManagerPopen: import os hm = GatewayManager(["popen//chdir=hello"] * 2) testdir.tmpdir.chdir() - hellopath = testdir.tmpdir.mkdir("hello") + hellopath = testdir.tmpdir.mkdir("hello").realpath() hm.makegateways() l = hm.multi_exec("import os ; channel.send(os.getcwd())").receive_each() paths = [x[1] for x in l] @@ -101,13 +101,13 @@ class TestGatewayManagerPopen: hm.multi_chdir("hello", inplacelocal=False) l = hm.multi_exec("import os ; channel.send(os.getcwd())").receive_each() assert len(l) == 2 - assert l == [os.getcwd()] * 2 + curwd = os.path.realpath(os.getcwd()) + assert l == [curwd] * 2 hm.multi_chdir("hello") l = hm.multi_exec("import os ; channel.send(os.getcwd())").receive_each() assert len(l) == 2 assert l[0] == l[1] - curwd = os.getcwd() assert l[0].startswith(curwd) assert l[0].endswith("hello") diff --git a/py/execnet/testing/test_xspec.py b/py/execnet/testing/test_xspec.py index 1aadc0683..e509bd664 100644 --- a/py/execnet/testing/test_xspec.py +++ b/py/execnet/testing/test_xspec.py @@ -104,13 +104,13 @@ class TestMakegateway: def test_popen_chdir_absolute(self, testdir): gw = py.execnet.makegateway("popen//chdir=%s" % testdir.tmpdir) rinfo = gw._rinfo() - assert rinfo.cwd == str(testdir.tmpdir) + assert rinfo.cwd == str(testdir.tmpdir.realpath()) def test_popen_chdir_newsub(self, testdir): testdir.chdir() gw = py.execnet.makegateway("popen//chdir=hello") rinfo = gw._rinfo() - assert rinfo.cwd == str(testdir.tmpdir.join("hello")) + assert rinfo.cwd == str(testdir.tmpdir.join("hello").realpath()) def test_ssh(self, specssh): sshhost = specssh.ssh diff --git a/py/test/dist/dsession.py b/py/test/dist/dsession.py index aa10c32fe..015efd003 100644 --- a/py/test/dist/dsession.py +++ b/py/test/dist/dsession.py @@ -230,7 +230,8 @@ class DSession(Session): if item not in self.item2nodes: raise AssertionError(item, self.item2nodes) nodes = self.item2nodes[item] - nodes.remove(node) + if node in nodes: # the node might have gone down already + nodes.remove(node) if not nodes: del self.item2nodes[item] self.node2pending[node].remove(item)