Mercurial > p > roundup > code
diff test/test_metakit.py @ 2856:adec352e2ce0
don't try to import all backends in backends.__init__ unless we *want* to
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Wed, 03 Nov 2004 01:34:21 +0000 |
| parents | 8c6c0d40f9c8 |
| children | e943b83e3e77 |
line wrap: on
line diff
--- a/test/test_metakit.py Wed Nov 03 01:10:53 2004 +0000 +++ b/test/test_metakit.py Wed Nov 03 01:34:21 2004 +0000 @@ -15,16 +15,16 @@ # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. # -# $Id: test_metakit.py,v 1.5 2004-03-24 05:33:13 richard Exp $ +# $Id: test_metakit.py,v 1.6 2004-11-03 01:34:21 richard Exp $ import unittest, os, shutil, time, weakref from db_test_base import DBTest, ROTest, SchemaTest, ClassicInitTest, config, password -from roundup import backends +from roundup.backends import get_backend, have_backend class metakitOpener: - if hasattr(backends, 'metakit'): - from roundup.backends import metakit as module + if have_backend('metakit'): + module = get_backend('metakit') module._instances = weakref.WeakValueDictionary() def nuke_database(self): @@ -65,7 +65,7 @@ def test_suite(): suite = unittest.TestSuite() - if not hasattr(backends, 'metakit'): + if not have_backend('metakit'): print 'Skipping metakit tests' return suite print 'Including metakit tests'
