From beb3a127008a76d9e08d039345bf38dde0adb845 Mon Sep 17 00:00:00 2001 From: hpk Date: Sun, 4 Feb 2007 15:40:46 +0100 Subject: [PATCH] [svn r37915] sanity checks --HG-- branch : trunk --- py/execnet/rsync.py | 2 ++ py/execnet/testing/test_rsync.py | 1 + 2 files changed, 3 insertions(+) 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()