diff --git a/py/execnet/rsync.py b/py/execnet/rsync.py index c4979feb8..adf87982f 100644 --- a/py/execnet/rsync.py +++ b/py/execnet/rsync.py @@ -19,6 +19,7 @@ class RSync(object): for name in options: assert name in ('delete') self._options = options + assert callback is None or callable(callback) self._callback = callback self._channels = {} self._receivequeue = Queue() @@ -31,6 +32,7 @@ class RSync(object): """ Adds a remote target specified via a 'gateway' and a remote destination directory. """ + assert finishedcallback is None or callable(finishedcallback) def itemcallback(req): self._receivequeue.put((channel, req)) channel = gateway.remote_exec(REMOTE_SOURCE) diff --git a/py/execnet/testing/test_rsync.py b/py/execnet/testing/test_rsync.py index cba7e76fc..d97a86aee 100644 --- a/py/execnet/testing/test_rsync.py +++ b/py/execnet/testing/test_rsync.py @@ -87,6 +87,7 @@ def test_file_disappearing(): class DRsync(RSync): def filter(self, x): + assert x != source if x.endswith("ex2"): self.x = 1 source.join("ex2").remove()