summaryrefslogtreecommitdiff
path: root/rdiff-backup/testing/connectiontest.py
diff options
context:
space:
mode:
authorbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-10-31 04:53:31 +0000
committerbescoto <bescoto@2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109>2005-10-31 04:53:31 +0000
commita5c03feacbbd9361eb3e2abe367b75529c83459b (patch)
treebcb8f86bf8cfc61bd771b6e45d557bdda7604e80 /rdiff-backup/testing/connectiontest.py
parenta2705f514b471e2b74c98a0cde588863e3ff22c6 (diff)
downloadrdiff-backup-a5c03feacbbd9361eb3e2abe367b75529c83459b.tar.gz
Added various compare options like --compare-full and --compare-hash
git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup/trunk@664 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
Diffstat (limited to 'rdiff-backup/testing/connectiontest.py')
-rw-r--r--rdiff-backup/testing/connectiontest.py15
1 files changed, 4 insertions, 11 deletions
diff --git a/rdiff-backup/testing/connectiontest.py b/rdiff-backup/testing/connectiontest.py
index d0f10f1..6537729 100644
--- a/rdiff-backup/testing/connectiontest.py
+++ b/rdiff-backup/testing/connectiontest.py
@@ -133,10 +133,10 @@ class PipeConnectionTest(unittest.TestCase):
def testIterators(self):
"""Test transmission of iterators"""
- i = iter(map(RORPsubstitute, range(10)))
+ i = iter([5, 10, 15]*100)
assert self.conn.hasattr(i, "next")
- datastring = self.conn.reval("lambda i: i.next().data", i)
- assert datastring == "Hello, there 0", datastring
+ ret_val = self.conn.reval("lambda i: i.next()*i.next()", i)
+ assert ret_val == 50, ret_val
def testRPaths(self):
"""Test transmission of rpaths"""
@@ -212,12 +212,5 @@ class RedirectedConnectionTest(unittest.TestCase):
def tearDown(self):
SetConnections.CloseConnections()
-class RORPsubstitute:
- """Used in testIterators above to simulate a RORP"""
- def __init__(self, i):
- self.index = i
- self.data = "Hello, there %d" % i
- self.file = None
-if __name__ == "__main__":
- unittest.main()
+if __name__ == "__main__": unittest.main()