diff options
| author | Guido van Rossum <guido@python.org> | 2006-08-18 22:13:04 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2006-08-18 22:13:04 +0000 |
| commit | e2b70bcf7401477936fba99a8bf4a1f759ecc8a3 (patch) | |
| tree | 4c9b65b7fd8c26a3d2f1b64ecd6b4c72a756b4b2 /Lib/bsddb/test | |
| parent | d2dbecb4ae9177e2e87adcb047147c6bcbf28cc1 (diff) | |
| download | cpython-git-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.tar.gz | |
Get rid of dict.has_key(). Boy this has a lot of repercussions!
Not all code has been fixed yet; this is just a checkpoint...
The C API still has PyDict_HasKey() and _HasKeyString(); not sure
if I want to change those just yet.
Diffstat (limited to 'Lib/bsddb/test')
| -rw-r--r-- | Lib/bsddb/test/test_all.py | 8 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_associate.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_basics.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_compare.py | 3 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_compat.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_dbshelve.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_dbtables.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_env_close.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_get_none.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_join.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_lock.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_queue.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_recno.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_sequence.py | 2 | ||||
| -rw-r--r-- | Lib/bsddb/test/test_thread.py | 2 |
15 files changed, 21 insertions, 16 deletions
diff --git a/Lib/bsddb/test/test_all.py b/Lib/bsddb/test/test_all.py index ad8b1e9e94..0b132f49cc 100644 --- a/Lib/bsddb/test/test_all.py +++ b/Lib/bsddb/test/test_all.py @@ -41,8 +41,12 @@ class PrintInfoFakeTest(unittest.TestCase): # This little hack is for when this module is run as main and all the # other modules import it so they will still be able to get the right # verbose setting. It's confusing but it works. -import test_all -test_all.verbose = verbose +try: + import test_all +except ImportError: + pass +else: + test_all.verbose = verbose def suite(): diff --git a/Lib/bsddb/test/test_associate.py b/Lib/bsddb/test/test_associate.py index 05ef83cb6f..33a7837245 100644 --- a/Lib/bsddb/test/test_associate.py +++ b/Lib/bsddb/test/test_associate.py @@ -14,7 +14,7 @@ except ImportError: have_threads = 0 import unittest -from test_all import verbose +from .test_all import verbose try: # For Pythons w/distutils pybsddb diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py index d6d507f806..f7f4c2dc53 100644 --- a/Lib/bsddb/test/test_basics.py +++ b/Lib/bsddb/test/test_basics.py @@ -20,7 +20,7 @@ except ImportError: # For Python 2.3 from bsddb import db -from test_all import verbose +from .test_all import verbose DASH = '-' diff --git a/Lib/bsddb/test/test_compare.py b/Lib/bsddb/test/test_compare.py index 59a45ec502..ccf8b83910 100644 --- a/Lib/bsddb/test/test_compare.py +++ b/Lib/bsddb/test/test_compare.py @@ -3,9 +3,10 @@ TestCases for python DB Btree key comparison function. """ import sys, os, re -import test_all from cStringIO import StringIO +from . import test_all + import unittest try: # For Pythons w/distutils pybsddb diff --git a/Lib/bsddb/test/test_compat.py b/Lib/bsddb/test/test_compat.py index b108db4c6a..841e01c8a6 100644 --- a/Lib/bsddb/test/test_compat.py +++ b/Lib/bsddb/test/test_compat.py @@ -7,7 +7,7 @@ import sys, os, string import unittest import tempfile -from test_all import verbose +from .test_all import verbose try: # For Pythons w/distutils pybsddb diff --git a/Lib/bsddb/test/test_dbshelve.py b/Lib/bsddb/test/test_dbshelve.py index 722ee5b407..bb85bf7211 100644 --- a/Lib/bsddb/test/test_dbshelve.py +++ b/Lib/bsddb/test/test_dbshelve.py @@ -15,7 +15,7 @@ except ImportError: # For Python 2.3 from bsddb import db, dbshelve -from test_all import verbose +from .test_all import verbose #---------------------------------------------------------------------- diff --git a/Lib/bsddb/test/test_dbtables.py b/Lib/bsddb/test/test_dbtables.py index 26e3d3650b..2ff93a3ef1 100644 --- a/Lib/bsddb/test/test_dbtables.py +++ b/Lib/bsddb/test/test_dbtables.py @@ -28,7 +28,7 @@ except ImportError: import pickle import unittest -from test_all import verbose +from .test_all import verbose try: # For Pythons w/distutils pybsddb diff --git a/Lib/bsddb/test/test_env_close.py b/Lib/bsddb/test/test_env_close.py index c1129417d1..43dcabe92b 100644 --- a/Lib/bsddb/test/test_env_close.py +++ b/Lib/bsddb/test/test_env_close.py @@ -15,7 +15,7 @@ except ImportError: # For Python 2.3 from bsddb import db -from test_all import verbose +from .test_all import verbose # We're going to get warnings in this module about trying to close the db when # its env is already closed. Let's just ignore those. diff --git a/Lib/bsddb/test/test_get_none.py b/Lib/bsddb/test/test_get_none.py index 5f09cecc6a..d1b69c7d74 100644 --- a/Lib/bsddb/test/test_get_none.py +++ b/Lib/bsddb/test/test_get_none.py @@ -14,7 +14,7 @@ except ImportError: # For Python 2.3 from bsddb import db -from test_all import verbose +from .test_all import verbose #---------------------------------------------------------------------- diff --git a/Lib/bsddb/test/test_join.py b/Lib/bsddb/test/test_join.py index 69a1e9deb8..6e98b0b621 100644 --- a/Lib/bsddb/test/test_join.py +++ b/Lib/bsddb/test/test_join.py @@ -13,7 +13,7 @@ except ImportError: have_threads = 0 import unittest -from test_all import verbose +from .test_all import verbose try: # For Pythons w/distutils pybsddb diff --git a/Lib/bsddb/test/test_lock.py b/Lib/bsddb/test/test_lock.py index 7d7779805d..53f11a82ff 100644 --- a/Lib/bsddb/test/test_lock.py +++ b/Lib/bsddb/test/test_lock.py @@ -15,7 +15,7 @@ except ImportError: import unittest -from test_all import verbose +from .test_all import verbose try: # For Pythons w/distutils pybsddb diff --git a/Lib/bsddb/test/test_queue.py b/Lib/bsddb/test/test_queue.py index 95cf20d0d2..4226c9e1e8 100644 --- a/Lib/bsddb/test/test_queue.py +++ b/Lib/bsddb/test/test_queue.py @@ -14,7 +14,7 @@ except ImportError: # For Python 2.3 from bsddb import db -from test_all import verbose +from .test_all import verbose #---------------------------------------------------------------------- diff --git a/Lib/bsddb/test/test_recno.py b/Lib/bsddb/test/test_recno.py index f1ea56afdb..170448e600 100644 --- a/Lib/bsddb/test/test_recno.py +++ b/Lib/bsddb/test/test_recno.py @@ -8,7 +8,7 @@ import tempfile from pprint import pprint import unittest -from test_all import verbose +from .test_all import verbose try: # For Pythons w/distutils pybsddb diff --git a/Lib/bsddb/test/test_sequence.py b/Lib/bsddb/test/test_sequence.py index 979f858c4a..48631a37e2 100644 --- a/Lib/bsddb/test/test_sequence.py +++ b/Lib/bsddb/test/test_sequence.py @@ -10,7 +10,7 @@ try: except ImportError: from bsddb import db -from test_all import verbose +from .test_all import verbose class DBSequenceTest(unittest.TestCase): diff --git a/Lib/bsddb/test/test_thread.py b/Lib/bsddb/test/test_thread.py index 31964f0b22..f18741323d 100644 --- a/Lib/bsddb/test/test_thread.py +++ b/Lib/bsddb/test/test_thread.py @@ -31,7 +31,7 @@ except NameError: pass import unittest -from test_all import verbose +from .test_all import verbose try: # For Pythons w/distutils pybsddb |
