[Zope-Coders] problem with Zope.App.startup
Jeremy Hylton
jeremy at zope.com
Fri Feb 27 11:58:00 EST 2004
I'm having trouble running the tests this morning. I ran the tests
after a few changes to ZODB.DB.DB and saw a couple of apparently
unrelated failures in ZPublisher's xmlrpc tests. The tests were failing
because dumps() didn't take an allow_none argument, which was
surprising.
I did a cvs update and tried to reproduce the failure. Now I can't even
get the tests to import:
localhost:~/src/Zope> python test.py -bvv ZPub
/usr/local/bin/python setup.py build_ext -i
running build_ext
running build_ext
running build_ext
[14241 refs]
Running unit tests at level 1
Running unit tests from /home/jeremy/src/Zope
Traceback (most recent call last):
File "test.py", line 813, in ?
process_args()
File "test.py", line 803, in process_args
bad = main(module_filter, test_filter, libdir)
File "test.py", line 622, in main
runner(files, test_filter, debug)
File "test.py", line 542, in runner
s = get_suite(file)
File "test.py", line 450, in get_suite
mod = package_import(modname)
File "test.py", line 442, in package_import
mod = __import__(modname)
File
"/home/jeremy/src/Zope/lib/python/ZPublisher/tests/testBaseRequest.py",
line 4, in ?
Zope.startup()
File "/home/jeremy/src/Zope/lib/python/Zope/__init__.py", line 46, in
startup
_startup()
File "/home/jeremy/src/Zope/lib/python/Zope/App/startup.py", line 54,
in startup
DB = configuration.dbtab.getDatabase('/', is_root=1)
AttributeError: 'NoneType' object has no attribute 'getDatabase'
I was worried that some of my recent changes to ZODB were to blame, but
I reverted them and still see the same problem.
It looks like configuration is DefaultConfiguration, which defines dbtab
to be None. It looks like that's intentional, but then I can't figure
out how a call to Zope.startup() should work.
Jeremy
More information about the Zope-Coders
mailing list