[Zodb-checkins] CVS: ZODB4/src/zodb/zeo/tests - threadtests.py:1.7 test_zeo.py:1.11 test_tbuf.py:1.4 test_conn.py:1.5 commitlock.py:1.7 cache.py:1.4

Jeremy Hylton jeremy at zope.com
Fri May 16 18:49:36 EDT 2003


Update of /cvs-repository/ZODB4/src/zodb/zeo/tests
In directory cvs.zope.org:/tmp/cvs-serv23113/zeo/tests

Modified Files:
	threadtests.py test_zeo.py test_tbuf.py test_conn.py 
	commitlock.py cache.py 
Log Message:
Change all tests to use test as the prefix.

A bunch of ZEO tests weren't getting run because ZEO was still using
check as the prefix.


=== ZODB4/src/zodb/zeo/tests/threadtests.py 1.6 => 1.7 ===
--- ZODB4/src/zodb/zeo/tests/threadtests.py:1.6	Thu Mar 13 16:32:30 2003
+++ ZODB4/src/zodb/zeo/tests/threadtests.py	Fri May 16 17:49:36 2003
@@ -110,7 +110,7 @@
     # Thread 1 should start a transaction, but not get all the way through it.
     # Main thread should close the connection.  Thread 1 should then get
     # disconnected.
-    def checkDisconnectedOnThread2Close(self):
+    def testDisconnectedOnThread2Close(self):
         doNextEvent = threading.Event()
         threadStartedEvent = threading.Event()
         thread1 = GetsThroughVoteThread(self._storage,
@@ -127,7 +127,7 @@
     # should start a transaction, and it will block in the tcp_begin() --
     # because thread 1 has acquired the lock in its tpc_begin().  Now the main
     # thread closes the storage and both sub-threads should get disconnected.
-    def checkSecondBeginFails(self):
+    def testSecondBeginFails(self):
         doNextEvent = threading.Event()
         threadStartedEvent = threading.Event()
         thread1 = GetsThroughVoteThread(self._storage,
@@ -145,7 +145,7 @@
         self.assertEqual(thread2.gotValueError, 1)
 
     # Run a bunch of threads doing small and large stores in parallel
-    def checkMTStores(self):
+    def testMTStores(self):
         threads = []
         for i in range(5):
             t = MTStoresThread(self._dostore)


=== ZODB4/src/zodb/zeo/tests/test_zeo.py 1.10 => 1.11 ===
--- ZODB4/src/zodb/zeo/tests/test_zeo.py:1.10	Wed Apr  9 14:32:55 2003
+++ ZODB4/src/zodb/zeo/tests/test_zeo.py	Fri May 16 17:49:36 2003
@@ -47,11 +47,11 @@
 class MiscZEOTests:
     """ZEO tests that don't fit in elsewhere."""
 
-    def checkLargeUpdate(self):
+    def testLargeUpdate(self):
         obj = MinPO("X" * (10 * 128 * 1024))
         self._dostore(data=obj)
 
-    def checkZEOInvalidation(self):
+    def testZEOInvalidation(self):
         addr = self._storage._addr
         storage2 = TestClientStorage(addr, wait=True, min_disconnect_poll=0.1)
         try:
@@ -154,6 +154,10 @@
     # storage, but the pack tests assume that the storage also supports
     # multiple revisions.
 
+    def testUnicodeTransactionAttributes(self):
+        # This test requires an iterator to run.
+        pass
+
 class FileStorageTests(UndoVersionStorageTests):
     """Test ZEO backed by a FileStorage."""
 
@@ -186,10 +190,10 @@
     # XXX These test seems to have massive failures when I run them.
     # I don't think they should fail, but need Barry's help to debug.
 
-    def checkCommitLockUndoClose(self):
+    def testCommitLockUndoClose(self):
         pass
 
-    def checkCommitLockUndoAbort(self):
+    def testCommitLockUndoAbort(self):
         pass
 
 class MappingStorageTests(StorageTests):
@@ -212,6 +216,6 @@
 def test_suite():
     suite = unittest.TestSuite()
     for klass in test_classes:
-        sub = unittest.makeSuite(klass, 'check')
+        sub = unittest.makeSuite(klass)
         suite.addTest(sub)
     return suite


=== ZODB4/src/zodb/zeo/tests/test_tbuf.py 1.3 => 1.4 ===
--- ZODB4/src/zodb/zeo/tests/test_tbuf.py:1.3	Thu Mar 13 16:32:30 2003
+++ ZODB4/src/zodb/zeo/tests/test_tbuf.py	Fri May 16 17:49:36 2003
@@ -31,7 +31,7 @@
 
 class TransBufTests(unittest.TestCase):
 
-    def checkTypicalUsage(self):
+    def testTypicalUsage(self):
         tbuf = TransactionBuffer()
         tbuf.store(*new_store_data())
         tbuf.invalidate(*new_invalidate_data())
@@ -60,11 +60,11 @@
                 x = x[:2]
             self.assertEqual(x, data[i])
 
-    def checkOrderPreserved(self):
+    def testOrderPreserved(self):
         tbuf = TransactionBuffer()
         self.doUpdates(tbuf)
 
-    def checkReusable(self):
+    def testReusable(self):
         tbuf = TransactionBuffer()
         self.doUpdates(tbuf)
         tbuf.clear()
@@ -73,4 +73,4 @@
         self.doUpdates(tbuf)
 
 def test_suite():
-    return unittest.makeSuite(TransBufTests, 'check')
+    return unittest.makeSuite(TransBufTests)


=== ZODB4/src/zodb/zeo/tests/test_conn.py 1.4 => 1.5 ===
--- ZODB4/src/zodb/zeo/tests/test_conn.py:1.4	Tue Feb 25 13:55:05 2003
+++ ZODB4/src/zodb/zeo/tests/test_conn.py	Fri May 16 17:49:36 2003
@@ -72,6 +72,6 @@
         name = "%s:%s" % (testclass.__name__, configclass.__name__)
         aclass = type.__new__(type, name, (configclass, testclass, object), {})
         aclass.level = level
-        sub = unittest.makeSuite(aclass, "check")
+        sub = unittest.makeSuite(aclass)
         suite.addTest(sub)
     return suite


=== ZODB4/src/zodb/zeo/tests/commitlock.py 1.6 => 1.7 ===
--- ZODB4/src/zodb/zeo/tests/commitlock.py:1.6	Thu Mar 13 16:32:30 2003
+++ ZODB4/src/zodb/zeo/tests/commitlock.py	Fri May 16 17:49:36 2003
@@ -102,7 +102,7 @@
         self._storage.store(oid, ZERO, data, refs, '', txn)
         return oid, txn
 
-    def checkCommitLockVoteFinish(self):
+    def testCommitLockVoteFinish(self):
         oid, txn = self._start_txn()
         self._storage.tpcVote(txn)
 
@@ -116,7 +116,7 @@
         self._dostore()
         self._cleanup()
 
-    def checkCommitLockVoteAbort(self):
+    def testCommitLockVoteAbort(self):
         oid, txn = self._start_txn()
         self._storage.tpcVote(txn)
 
@@ -129,7 +129,7 @@
         self._dostore()
         self._cleanup()
 
-    def checkCommitLockVoteClose(self):
+    def testCommitLockVoteClose(self):
         oid, txn = self._start_txn()
         self._storage.tpcVote(txn)
 
@@ -196,7 +196,7 @@
     def _finish_undo(self, msgid):
         return self._storage._server.rpc._deferred_wait(msgid)
 
-    def checkCommitLockUndoFinish(self):
+    def testCommitLockUndoFinish(self):
         trans_id = self._get_trans_id()
         oid, txn = self._start_txn()
         msgid = self._begin_undo(trans_id)
@@ -213,7 +213,7 @@
         self._dostore()
         self._cleanup()
 
-    def checkCommitLockUndoAbort(self):
+    def testCommitLockUndoAbort(self):
         trans_id = self._get_trans_id()
         oid, txn = self._start_txn()
         msgid = self._begin_undo(trans_id)
@@ -229,7 +229,7 @@
         self._dostore()
         self._cleanup()
 
-    def checkCommitLockUndoClose(self):
+    def testCommitLockUndoClose(self):
         trans_id = self._get_trans_id()
         oid, txn = self._start_txn()
         msgid = self._begin_undo(trans_id)


=== ZODB4/src/zodb/zeo/tests/cache.py 1.3 => 1.4 ===
--- ZODB4/src/zodb/zeo/tests/cache.py:1.3	Wed Feb  5 18:28:22 2003
+++ ZODB4/src/zodb/zeo/tests/cache.py	Fri May 16 17:49:36 2003
@@ -20,7 +20,7 @@
 
 class TransUndoStorageWithCache:
 
-    def checkUndoInvalidation(self):
+    def testUndoInvalidation(self):
         oid = self._storage.newObjectId()
         revid = self._dostore(oid, data=MinPO(23))
         revid = self._dostore(oid, revid=revid, data=MinPO(24))
@@ -59,7 +59,7 @@
 
 class StorageWithCache:
 
-    def checkAbortVersionInvalidation(self):
+    def testAbortVersionInvalidation(self):
         oid = self._storage.newObjectId()
         revid = self._dostore(oid, data=MinPO(1))
         revid = self._dostore(oid, revid=revid, data=MinPO(2))
@@ -75,7 +75,7 @@
         obj = zodb_unpickle(data)
         assert obj == MinPO(2), obj
 
-    def checkCommitEmptyVersionInvalidation(self):
+    def testCommitEmptyVersionInvalidation(self):
         oid = self._storage.newObjectId()
         revid = self._dostore(oid, data=MinPO(1))
         revid = self._dostore(oid, revid=revid, data=MinPO(2))
@@ -90,7 +90,7 @@
         obj = zodb_unpickle(data)
         assert obj == MinPO(3), obj
 
-    def checkCommitVersionInvalidation(self):
+    def testCommitVersionInvalidation(self):
         oid = self._storage.newObjectId()
         revid = self._dostore(oid, data=MinPO(1))
         revid = self._dostore(oid, revid=revid, data=MinPO(2))




More information about the Zodb-checkins mailing list