[Zope-Checkins] CVS: Zope/lib/python/SearchIndex/tests - testUnTextIndex.py:1.5.32.5

Tres Seaver tseaver@zope.com
Fri, 12 Oct 2001 01:46:03 -0400


Update of /cvs-repository/Zope/lib/python/SearchIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv22646

Modified Files:
      Tag: Zope-2_4-branch
	testUnTextIndex.py 
Log Message:



  - Move 'catch_log_errors' into 'setUp', and pair it with an
    'ignore_log_errors' in 'tearDown';  prevents the framework's
    log grabber from screwing up non-framework tests which happen
    to generate log entries.


=== Zope/lib/python/SearchIndex/tests/testUnTextIndex.py 1.5.32.4 => 1.5.32.5 ===
 execfile(os.path.join(sys.path[0], 'framework.py'))
 
-catch_log_errors()
 from Testing.ZODButil import makeDB, cleanDB
 
 import SearchIndex.UnTextIndex
@@ -95,6 +94,7 @@
 class Tests(unittest.TestCase):
 
    def setUp(self):
+       catch_log_errors()
        self.index=SearchIndex.UnTextIndex.UnTextIndex('text')
        self.doc=Dummy(text='this is the time, when all good zopes')
 
@@ -113,6 +113,7 @@
        del self.db
 
    def tearDown(self):
+       ignore_log_errors()
        get_transaction().abort()
        if hasattr(self, 'jar'):
            self.dbclose()