[Checkins] SVN: transaction/branches/sphinx/ Coverage for NoRollbackSavepoint.

Tres Seaver cvs-admin at zope.org
Tue Dec 18 05:25:10 UTC 2012


Log message for revision 128755:
  Coverage for NoRollbackSavepoint.

Changed:
  _U  transaction/branches/sphinx/
  U   transaction/branches/sphinx/transaction/tests/test__transaction.py

-=-
Modified: transaction/branches/sphinx/transaction/tests/test__transaction.py
===================================================================
--- transaction/branches/sphinx/transaction/tests/test__transaction.py	2012-12-18 05:25:09 UTC (rev 128754)
+++ transaction/branches/sphinx/transaction/tests/test__transaction.py	2012-12-18 05:25:10 UTC (rev 128755)
@@ -1302,6 +1302,26 @@
         self.assertTrue(txn._unjoin is dm)
 
 
+class NoRollbackSavepointTests(unittest.TestCase):
+
+    def _getTargetClass(self):
+        from transaction._transaction import NoRollbackSavepoint
+        return NoRollbackSavepoint
+
+    def _makeOne(self, datamanager):
+        return self._getTargetClass()(datamanager)
+
+    def test_ctor(self):
+        dm = object()
+        nrsp = self._makeOne(dm)
+        self.assertTrue(nrsp.datamanager is dm)
+
+    def test_rollback(self):
+        dm = object()
+        nrsp = self._makeOne(dm)
+        self.assertRaises(TypeError, nrsp.rollback)
+
+
 class MiscellaneousTests(unittest.TestCase):
 
     def test_BBB_join(self):
@@ -1414,5 +1434,6 @@
         unittest.makeSuite(DataManagerAdapterTests),
         unittest.makeSuite(SavepointTests),
         unittest.makeSuite(AbortSavepointTests),
+        unittest.makeSuite(NoRollbackSavepointTests),
         unittest.makeSuite(MiscellaneousTests),
         ))



More information about the checkins mailing list