[svn r63219] fixing tests to care for underlying symlinked working directories

--HG--
branch : trunk
This commit is contained in:
hpk
2009-03-23 03:07:53 +01:00
parent d50e4892a3
commit af39c9850e
3 changed files with 7 additions and 6 deletions

View File

@@ -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")