Modify import of test_support so that the code can also be used with a

stand alone distribution of bsddb that includes its own small copy of
test_support for the needed functionality on older pythons.
This commit is contained in:
Gregory P. Smith 2008-03-02 20:00:53 +00:00
parent e6dab2a077
commit 492e2bfefa
15 changed files with 73 additions and 15 deletions

View file

@ -38,6 +38,11 @@ except ImportError:
# For Python 2.3
from bsddb import db, dbutils
try:
from bsddb3 import test_support
except ImportError:
from test import test_support
#----------------------------------------------------------------------
@ -68,7 +73,6 @@ class BaseThreadedTestCase(unittest.TestCase):
self.d.open(self.filename, self.dbtype, self.dbopenflags|db.DB_CREATE)
def tearDown(self):
from test import test_support
test_support.rmtree(self.homeDir)
self.d.close()
self.env.close()