| 132 |
| 133 |
| 134 |
| 135 |
| 136 |
| 137 |
| 138 |
| 139 |
| 140 |
| 141 |
| 142 |
| 143 |
| 144 |
| 145 |
| 146 |
| 147 |
| 148 |
| 149 |
| 150 |
| 151 | |
def test_file_disappearing(self): |
dest = self.dest1 |
source = self.source |
source.ensure("ex").write("a" * 100) |
source.ensure("ex2").write("a" * 100) |
|
class DRsync(RSync): |
def filter(self, x): |
assert x != source |
if x.endswith("ex2"): |
self.x = 1 |
source.join("ex2").remove() |
return True |
|
-> rsync = DRsync(source) |
rsync.add_target(gw, dest) |
rsync.send() |
assert rsync.x == 1 |
assert len(dest.listdir()) == 1 |
assert len(source.listdir()) == 1 | |