diff options
-rw-r--r-- | Lib/bsddb/test/test_associate.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_basics.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_compare.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_cursor_pget_bug.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_dbobj.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_dbshelve.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_dbtables.py | 5 | ||||
-rw-r--r-- | Lib/bsddb/test/test_env_close.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_join.py | 5 | ||||
-rw-r--r-- | Lib/bsddb/test/test_lock.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_misc.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_pickle.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_recno.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_sequence.py | 6 | ||||
-rw-r--r-- | Lib/bsddb/test/test_thread.py | 6 |
15 files changed, 73 insertions, 15 deletions
diff --git a/Lib/bsddb/test/test_associate.py b/Lib/bsddb/test/test_associate.py index 88c1f46..80b1a8e 100644 --- a/Lib/bsddb/test/test_associate.py +++ b/Lib/bsddb/test/test_associate.py @@ -23,6 +23,11 @@ except ImportError: # For Python 2.3 from bsddb import db, dbshelve +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- @@ -106,7 +111,6 @@ class AssociateErrorTestCase(unittest.TestCase): def tearDown(self): self.env.close() self.env = None - from test import test_support test_support.rmtree(self.homeDir) def test00_associateDBError(self): diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py index af82cd1..f0b5e32 100644 --- a/Lib/bsddb/test/test_basics.py +++ b/Lib/bsddb/test/test_basics.py @@ -8,7 +8,6 @@ import errno import string import tempfile from pprint import pprint -from test import test_support import unittest import time @@ -19,6 +18,11 @@ except ImportError: # For Python 2.3 from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + from test_all import verbose DASH = '-' diff --git a/Lib/bsddb/test/test_compare.py b/Lib/bsddb/test/test_compare.py index 2782e8c..ac9ee6b 100644 --- a/Lib/bsddb/test/test_compare.py +++ b/Lib/bsddb/test/test_compare.py @@ -15,6 +15,11 @@ except ImportError: # For Python 2.3 from bsddb import db, dbshelve +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + lexical_cmp = cmp def lowercase_cmp(left, right): @@ -70,7 +75,6 @@ class AbstractBtreeKeyCompareTestCase (unittest.TestCase): if self.env is not None: self.env.close () self.env = None - from test import test_support test_support.rmtree(self.homeDir) def addDataToDB (self, data): diff --git a/Lib/bsddb/test/test_cursor_pget_bug.py b/Lib/bsddb/test/test_cursor_pget_bug.py index 95bbe1b..4868562 100644 --- a/Lib/bsddb/test/test_cursor_pget_bug.py +++ b/Lib/bsddb/test/test_cursor_pget_bug.py @@ -9,6 +9,11 @@ except ImportError: # For Python 2.3 from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- @@ -42,7 +47,6 @@ class pget_bugTestCase(unittest.TestCase): del self.secondary_db del self.primary_db del self.env - from test import test_support test_support.rmtree(self.homeDir) def test_pget(self): diff --git a/Lib/bsddb/test/test_dbobj.py b/Lib/bsddb/test/test_dbobj.py index 071b547..c15face 100644 --- a/Lib/bsddb/test/test_dbobj.py +++ b/Lib/bsddb/test/test_dbobj.py @@ -10,6 +10,11 @@ except ImportError: # For Python 2.3 from bsddb import db, dbobj +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- @@ -29,7 +34,6 @@ class dbobjTestCase(unittest.TestCase): del self.db if hasattr(self, 'env'): del self.env - from test import test_support test_support.rmtree(self.homeDir) def test01_both(self): diff --git a/Lib/bsddb/test/test_dbshelve.py b/Lib/bsddb/test/test_dbshelve.py index d6c997f..2107085 100644 --- a/Lib/bsddb/test/test_dbshelve.py +++ b/Lib/bsddb/test/test_dbshelve.py @@ -14,6 +14,11 @@ except ImportError: # For Python 2.3 from bsddb import db, dbshelve +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + from test_all import verbose @@ -262,7 +267,6 @@ class BasicEnvShelveTestCase(DBShelveTestCase): def tearDown(self): - from test import test_support test_support.rmtree(self.homeDir) self.do_close() diff --git a/Lib/bsddb/test/test_dbtables.py b/Lib/bsddb/test/test_dbtables.py index 7acfdd1..46602ce 100644 --- a/Lib/bsddb/test/test_dbtables.py +++ b/Lib/bsddb/test/test_dbtables.py @@ -39,6 +39,10 @@ except ImportError: # For Python 2.3 from bsddb import db, dbtables +try: + from bsddb3 import test_support +except ImportError: + from test import test_support #---------------------------------------------------------------------- @@ -57,7 +61,6 @@ class TableDBTestCase(unittest.TestCase): def tearDown(self): self.tdb.close() - from test import test_support test_support.rmtree(self.testHomeDir) def test01(self): diff --git a/Lib/bsddb/test/test_env_close.py b/Lib/bsddb/test/test_env_close.py index 409f3dc..e07e472 100644 --- a/Lib/bsddb/test/test_env_close.py +++ b/Lib/bsddb/test/test_env_close.py @@ -13,6 +13,11 @@ except ImportError: # For Python 2.3 from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + from test_all import verbose # We're going to get warnings in this module about trying to close the db when @@ -39,7 +44,6 @@ class DBEnvClosedEarlyCrash(unittest.TestCase): tempfile.tempdir = None def tearDown(self): - from test import test_support test_support.rmtree(self.homeDir) def test01_close_dbenv_before_db(self): diff --git a/Lib/bsddb/test/test_join.py b/Lib/bsddb/test/test_join.py index f9e7f00..c6c5c88 100644 --- a/Lib/bsddb/test/test_join.py +++ b/Lib/bsddb/test/test_join.py @@ -20,6 +20,10 @@ except ImportError: # For Python 2.3 from bsddb import db, dbshelve +try: + from bsddb3 import test_support +except ImportError: + from test import test_support #---------------------------------------------------------------------- @@ -56,7 +60,6 @@ class JoinTestCase(unittest.TestCase): def tearDown(self): self.env.close() - from test import test_support test_support.rmtree(self.homeDir) def test01_join(self): diff --git a/Lib/bsddb/test/test_lock.py b/Lib/bsddb/test/test_lock.py index 2862079..3b2f9e4 100644 --- a/Lib/bsddb/test/test_lock.py +++ b/Lib/bsddb/test/test_lock.py @@ -22,6 +22,11 @@ except ImportError: # For Python 2.3 from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- @@ -36,7 +41,6 @@ class LockingTestCase(unittest.TestCase): def tearDown(self): self.env.close() - from test import test_support test_support.rmtree(self.homeDir) diff --git a/Lib/bsddb/test/test_misc.py b/Lib/bsddb/test/test_misc.py index a9228f9..9a790e7 100644 --- a/Lib/bsddb/test/test_misc.py +++ b/Lib/bsddb/test/test_misc.py @@ -12,6 +12,11 @@ except ImportError: # For Python 2.3 from bsddb import db, dbshelve, hashopen +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- class MiscTestCase(unittest.TestCase): @@ -25,7 +30,6 @@ class MiscTestCase(unittest.TestCase): pass def tearDown(self): - from test import test_support test_support.unlink(self.filename) test_support.rmtree(self.homeDir) diff --git a/Lib/bsddb/test/test_pickle.py b/Lib/bsddb/test/test_pickle.py index 10ce685..d691e37 100644 --- a/Lib/bsddb/test/test_pickle.py +++ b/Lib/bsddb/test/test_pickle.py @@ -15,6 +15,11 @@ except ImportError, e: # For Python 2.3 from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- @@ -34,7 +39,6 @@ class pickleTestCase(unittest.TestCase): del self.db if hasattr(self, 'env'): del self.env - from test import test_support test_support.rmtree(self.homeDir) def _base_test_pickle_DBError(self, pickle): diff --git a/Lib/bsddb/test/test_recno.py b/Lib/bsddb/test/test_recno.py index 1074a76..43cf176 100644 --- a/Lib/bsddb/test/test_recno.py +++ b/Lib/bsddb/test/test_recno.py @@ -16,6 +16,11 @@ except ImportError: # For Python 2.3 from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -27,7 +32,6 @@ class SimpleRecnoTestCase(unittest.TestCase): self.homeDir = None def tearDown(self): - from test import test_support test_support.unlink(self.filename) if self.homeDir: test_support.rmtree(self.homeDir) diff --git a/Lib/bsddb/test/test_sequence.py b/Lib/bsddb/test/test_sequence.py index 86c58b0..ff94b76 100644 --- a/Lib/bsddb/test/test_sequence.py +++ b/Lib/bsddb/test/test_sequence.py @@ -8,6 +8,11 @@ try: except ImportError: from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + class DBSequenceTest(unittest.TestCase): def setUp(self): @@ -37,7 +42,6 @@ class DBSequenceTest(unittest.TestCase): self.dbenv.close() del self.dbenv - from test import test_support test_support.rmtree(self.homeDir) def test_get(self): diff --git a/Lib/bsddb/test/test_thread.py b/Lib/bsddb/test/test_thread.py index 8a8b313..15ed905 100644 --- a/Lib/bsddb/test/test_thread.py +++ b/Lib/bsddb/test/test_thread.py @@ -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() |