def test_hostmanager_init_rsync_roots(self): |
dir2 = self.source.ensure("dir1", "dir2", dir=1) |
self.source.ensure("dir1", "somefile", dir=1) |
dir2.ensure("hello") |
self.source.ensure("bogusdir", "file") |
self.source.join("conftest.py").write(py.code.Source(""" |
dist_rsync_roots = ['dir1/dir2'] |
""")) |
config = py.test.config._reparse([self.source]) |
hm = HostManager(config, |
hosts=[HostInfo("localhost:" + str(self.dest))]) |
events = [] |
-> hm.init_rsync(reporter=events.append) |
assert self.dest.join("dir2").check() |
assert not self.dest.join("dir1").check() |
assert not self.dest.join("bogus").check() |