[svn r38755] fix reporting of duplicate remote host rsyncs

and adding an XXX test (not easy to test ssh hosts
because it modifies remote state)

--HG--
branch : trunk
This commit is contained in:
hpk 2007-02-13 21:09:25 +01:00
parent d919ad9eee
commit a3dd6dfd7c
2 changed files with 14 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class AbstractReporter(object):
hostrepr, item.remotepath)
else:
print "%15s: skip duplicate rsync to %r" % (
hostrepr, item.root)
hostrepr, item.remotepath)
else:
print "%15s: rsync %r to remote %r" % (hostrepr,
item.root.basename,

View File

@ -260,6 +260,19 @@ class TestHostManager(DirSetup):
assert not host.relpath
assert events
def XXXtest_ssh_rsync_samehost_twice(self):
XXX we have no easy way to have a temp directory remotely!
option = py.test.config.option
if option.sshtarget is None:
py.test.skip("no known ssh target, use -S to set one")
host1 = HostInfo("%s" % (option.sshtarget, ))
host2 = HostInfo("%s" % (option.sshtarget, ))
hm = HostManager(config, hosts=[host1, host2])
events = []
hm.init_rsync(events.append)
print events
assert 0
def test_getpath_relto_home():
x = getpath_relto_home("hello")
assert x == py.path.local._gethomedir().join("hello")