[svn r37915] sanity checks

--HG--
branch : trunk
This commit is contained in:
hpk 2007-02-04 15:40:46 +01:00
parent e4f5a2259c
commit beb3a12700
2 changed files with 3 additions and 0 deletions

View File

@ -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)

View File

@ -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()