[Zope-Checkins] CVS: Zope/lib/python/Zope/Startup/tests -
testStarter.py:1.5
Fred L. Drake, Jr.
fred at zope.com
Thu Aug 28 12:04:38 EDT 2003
Update of /cvs-repository/Zope/lib/python/Zope/Startup/tests
In directory cvs.zope.org:/tmp/cvs-serv16594
Modified Files:
testStarter.py
Log Message:
- only load the configuration schema once
- minor cleanups
=== Zope/lib/python/Zope/Startup/tests/testStarter.py 1.4 => 1.5 ===
--- Zope/lib/python/Zope/Startup/tests/testStarter.py:1.4 Thu Aug 28 10:48:47 2003
+++ Zope/lib/python/Zope/Startup/tests/testStarter.py Thu Aug 28 11:04:37 2003
@@ -15,15 +15,16 @@
import os
import cStringIO
+import logging
import tempfile
import unittest
import ZConfig
import Zope.Startup
-from Zope.Startup import ZopeStarter
from App.config import getConfiguration
-import logging
+from Zope.Startup import ZopeStarter
+
TEMPNAME = tempfile.mktemp()
TEMPPRODUCTS = os.path.join(TEMPNAME, "Products")
@@ -39,15 +40,18 @@
logger_states = {}
for name in ('event', 'trace', 'access'):
logger = logging.getLogger(name)
- logger_states[name] = {'level':logger.level,
- 'propagate':logger.propagate,
- 'handlers':logger.handlers,
- 'filters':logger.filters}
+ logger_states[name] = {'level': logger.level,
+ 'propagate': logger.propagate,
+ 'handlers': logger.handlers,
+ 'filters': logger.filters}
class ZopeStarterTestCase(unittest.TestCase):
+ schema = None
+
def setUp(self):
- self.schema = getSchema()
+ if self.schema is None:
+ ZopeStarterTestCase.schema = getSchema()
self.original_event_logger = logging.getLogger
def tearDown(self):
More information about the Zope-Checkins
mailing list