rdiff-backup-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Rdiff-backup-commits] Changes to rdiff-backup/testing/connectiontest.py


From: Ben Escoto
Subject: [Rdiff-backup-commits] Changes to rdiff-backup/testing/connectiontest.py
Date: Sun, 30 Oct 2005 23:53:34 -0500

Index: rdiff-backup/testing/connectiontest.py
diff -u rdiff-backup/testing/connectiontest.py:1.9 
rdiff-backup/testing/connectiontest.py:1.10
--- rdiff-backup/testing/connectiontest.py:1.9  Sun Sep 11 03:49:18 2005
+++ rdiff-backup/testing/connectiontest.py      Mon Oct 31 04:53:31 2005
@@ -133,10 +133,10 @@
 
        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 @@
        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()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]