[Zodb-checkins] CVS: Zope/lib/python/ZODB/tests - testDB.py:1.6
Jeremy Hylton
jeremy at zope.com
Wed Mar 3 09:55:07 EST 2004
Update of /cvs-repository/Zope/lib/python/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv23168
Modified Files:
testDB.py
Log Message:
Convert testSets DeprecationWarnings into exceptions.
=== Zope/lib/python/ZODB/tests/testDB.py 1.5 => 1.6 ===
--- Zope/lib/python/ZODB/tests/testDB.py:1.5 Thu Oct 2 14:17:17 2003
+++ Zope/lib/python/ZODB/tests/testDB.py Wed Mar 3 09:55:01 2004
@@ -14,6 +14,7 @@
import os
import time
import unittest
+import warnings
import ZODB
import ZODB.FileStorage
@@ -48,9 +49,15 @@
def testSets(self):
# test set methods that have non-trivial implementations
- self.db.setCacheDeactivateAfter(12) # deprecated
+ warnings.filterwarnings("error", category=DeprecationWarning)
+ self.assertRaises(DeprecationWarning,
+ self.db.setCacheDeactivateAfter, 12)
+ self.assertRaises(DeprecationWarning,
+ self.db.setVersionCacheDeactivateAfter, 12)
+ # XXX There is no API call for removing the warning we just
+ # added, but filters appears to be a public variable.
+ del warnings.filters[0]
self.db.setCacheSize(15)
- self.db.setVersionCacheDeactivateAfter(12) # deprecated
self.db.setVersionCacheSize(15)
def test_removeVersionPool(self):
More information about the Zodb-checkins
mailing list