[Zope-dev] When is the configuration read in Zope 2.7?
Andreas Jung
lists at zopyx.com
Mon May 17 15:06:29 EDT 2004
I tried the patch but a unittest is still failing:
ajung at localhost:~/sandboxes/Zope-2_7-branch: python2.3 test.py --dir
lib/python/Zope
Running unit tests from /develop/sandboxes/Zope-2_7-branch
INFO:event:INFO(0) Zope hello
Error in test testZopeRunConfigure
(Zope.Startup.tests.testStarter.ZopeStarterTestCase)
Traceback (most recent call last):
File
"/develop/sandboxes/Zope-2_7-branch/lib/python/Zope/Startup/tests/testStarter.py",
line 359, in testZopeRunConfigure
self.failUnlessEqual(new_config.zserver_threads, 100)
AttributeError: DefaultConfiguration instance has no attribute
'zserver_threads'
-aj
--On Montag, 17. Mai 2004 14:38 Uhr -0400 "Erik A.Dahl" <edahl at confmon.com>
wrote:
> Ok,
>
> I think I have a fix for this but we have a little semantics issue. I
> thought that once the Zope config was set it could not be changed. In
> the new ZOPE_CONFIG patch the environ variable only gets used as a last
> resort in Zope.app() if no other configuration has been set. To do this
> I added a isConfigured() function to App.config to check its _config
> global. I'm assuming that this is the "official" Zope config, correct?
>
> Now there is a test testZopeRunConfigure in
> lib/python/Zope/Startup/tests/testStarter.py that runs
> App.config.getConfiguration() and then makes a test config file and sets
> it. The result is a test where the config is reset within one run. This
> test fails with the semantics described above. Which is correct? I'm
> enclosing the patch for reference.
>
> -EAD
>
--
Andreas Jung
--------------------------------
www.zopyx.com Software-Entwicklung und Consulting Andreas Jung
More information about the Zope-Dev
mailing list