[py-svn] r32593 - py/branch/distributed/py/test/rsession
arigo at codespeak.net
arigo at codespeak.net
Fri Sep 22 18:43:52 CEST 2006
Author: arigo
Date: Fri Sep 22 18:43:51 2006
New Revision: 32593
Modified:
py/branch/distributed/py/test/rsession/rsync.py
Log:
It seems to be most useful for py.test that rsync doesn't complain when
files change under its feet. Such files are generally harmless,
master-side-only files, e.g. screenlogs.
Modified: py/branch/distributed/py/test/rsession/rsync.py
==============================================================================
--- py/branch/distributed/py/test/rsession/rsync.py (original)
+++ py/branch/distributed/py/test/rsession/rsync.py Fri Sep 22 18:43:51 2006
@@ -141,10 +141,14 @@
channel.send((relcomponents, checksum))
modifiedfiles.append((path, msg))
receive_directory_structure(destdir, [])
+
+ STRICT_CHECK = False # seems most useful this way for py.test
+
for path, (time, size) in modifiedfiles:
data = channel.receive()
if data is not None:
- assert len(data) == size
+ if STRICT_CHECK and len(data) != size:
+ raise IOError('file modified during rsync: %r' % (path,))
f = open(path, 'wb')
f.write(data)
f.close()
More information about the pytest-commit
mailing list