diff options
Diffstat (limited to 'Lib')
| -rw-r--r-- | Lib/bsddb/test/test_associate.py | 6 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_basics.py | 5 | ||||
| -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 | 5 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_thread.py | 6 |
15 files changed, 71 insertions, 15 deletions
diff --git a/Lib/bsddb/test/test_associate.py b/Lib/bsddb/test/test_associate.py index 1a32460..1c80a88 100644 --- a/Lib/bsddb/test/test_associate.py +++ b/Lib/bsddb/test/test_associate.py @@ -24,6 +24,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 + #---------------------------------------------------------------------- @@ -107,7 +112,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 77ef361..00eb9bd 100644 --- a/Lib/bsddb/test/test_basics.py +++ b/Lib/bsddb/test/test_basics.py @@ -9,7 +9,6 @@ import errno import string import tempfile from pprint import pprint -from test import test_support import unittest import time @@ -21,6 +20,10 @@ except ImportError: from bsddb import db from bsddb.test.test_all import verbose +try: + from bsddb3 import test_support +except ImportError: + from test import test_support DASH = b'-' letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' diff --git a/Lib/bsddb/test/test_compare.py b/Lib/bsddb/test/test_compare.py index 3e9ecce..2c9706a 100644 --- a/Lib/bsddb/test/test_compare.py +++ b/Lib/bsddb/test/test_compare.py @@ -16,6 +16,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): @@ -84,7 +89,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 6682180..887a69e 100644 --- a/Lib/bsddb/test/test_cursor_pget_bug.py +++ b/Lib/bsddb/test/test_cursor_pget_bug.py @@ -6,6 +6,11 @@ import tempfile from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- @@ -39,7 +44,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 2d0f916..f67af40 100644 --- a/Lib/bsddb/test/test_dbobj.py +++ b/Lib/bsddb/test/test_dbobj.py @@ -11,6 +11,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 c66c7c1..99d0c49 100644 --- a/Lib/bsddb/test/test_dbshelve.py +++ b/Lib/bsddb/test/test_dbshelve.py @@ -9,6 +9,11 @@ import unittest from bsddb import db, dbshelve +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + from bsddb.test.test_all import verbose @@ -279,7 +284,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 6c168bc..8964de8 100644 --- a/Lib/bsddb/test/test_dbtables.py +++ b/Lib/bsddb/test/test_dbtables.py @@ -34,6 +34,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 #---------------------------------------------------------------------- @@ -52,7 +56,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 fa3adad..9f7c853 100644 --- a/Lib/bsddb/test/test_env_close.py +++ b/Lib/bsddb/test/test_env_close.py @@ -15,6 +15,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 bsddb.test.test_all import verbose # We're going to get warnings in this module about trying to close the db when @@ -41,7 +46,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 07e7e01..311835a 100644 --- a/Lib/bsddb/test/test_join.py +++ b/Lib/bsddb/test/test_join.py @@ -18,6 +18,10 @@ from bsddb.test.test_all import verbose from bsddb import db, dbshelve, StringKeys +try: + from bsddb3 import test_support +except ImportError: + from test import test_support #---------------------------------------------------------------------- @@ -57,7 +61,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 ca521de..973bc42 100644 --- a/Lib/bsddb/test/test_lock.py +++ b/Lib/bsddb/test/test_lock.py @@ -23,6 +23,11 @@ except ImportError: # For Python 2.3 from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- @@ -37,7 +42,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 5b9ab0a..0d81288 100644 --- a/Lib/bsddb/test/test_misc.py +++ b/Lib/bsddb/test/test_misc.py @@ -14,6 +14,11 @@ except ImportError: # For the bundled bsddb from bsddb import db, dbshelve, hashopen +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- class MiscTestCase(unittest.TestCase): @@ -27,7 +32,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 01a5c45..f4c34ab 100644 --- a/Lib/bsddb/test/test_pickle.py +++ b/Lib/bsddb/test/test_pickle.py @@ -13,6 +13,11 @@ except ImportError as e: # For Python 2.3 from bsddb import db +try: + from bsddb3 import test_support +except ImportError: + from test import test_support + #---------------------------------------------------------------------- @@ -31,7 +36,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 dc15ad1..6855d18 100644 --- a/Lib/bsddb/test/test_recno.py +++ b/Lib/bsddb/test/test_recno.py @@ -18,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 + letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' @@ -29,7 +34,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 fa80e7c..90be5f6 100644 --- a/Lib/bsddb/test/test_sequence.py +++ b/Lib/bsddb/test/test_sequence.py @@ -11,6 +11,10 @@ except ImportError: from bsddb import db from bsddb.test.test_all import verbose +try: + from bsddb3 import test_support +except ImportError: + from test import test_support class DBSequenceTest(unittest.TestCase): @@ -41,7 +45,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 7397a50..359c10d 100644 --- a/Lib/bsddb/test/test_thread.py +++ b/Lib/bsddb/test/test_thread.py @@ -33,6 +33,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 + #---------------------------------------------------------------------- @@ -63,7 +68,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() |
