[Zodb-checkins] CVS: StandaloneZODB/ZODB/tests - StorageTestBase.py:1.9.12.1

Jeremy Hylton jeremy@zope.com
Sat, 1 Dec 2001 23:32:21 -0500


Update of /cvs-repository/StandaloneZODB/ZODB/tests
In directory cvs.zope.org:/tmp/cvs-serv8340

Modified Files:
      Tag: StandaloneZODB-1_0-branch
	StorageTestBase.py 
Log Message:
Get module from sys.modules


=== StandaloneZODB/ZODB/tests/StorageTestBase.py 1.9 => 1.9.12.1 ===
 def import_helper(name):
     mod = __import__(name)
-    for part in string.split(name, ".")[1:]:
-        mod = getattr(mod, part)
-    return mod
+    return sys.modules[name]
 
 
 class StorageTestBase(unittest.TestCase):