summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2006-08-18 22:13:04 (GMT)
committerGuido van Rossum <guido@python.org>2006-08-18 22:13:04 (GMT)
commite2b70bcf7401477936fba99a8bf4a1f759ecc8a3 (patch)
tree4c9b65b7fd8c26a3d2f1b64ecd6b4c72a756b4b2 /Lib/bsddb/test
parentd2dbecb4ae9177e2e87adcb047147c6bcbf28cc1 (diff)
downloadcpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.zip
cpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.tar.gz
cpython-e2b70bcf7401477936fba99a8bf4a1f759ecc8a3.tar.bz2
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.py8
-rw-r--r--Lib/bsddb/test/test_associate.py2
-rw-r--r--Lib/bsddb/test/test_basics.py2
-rw-r--r--Lib/bsddb/test/test_compare.py3
-rw-r--r--Lib/bsddb/test/test_compat.py2
-rw-r--r--Lib/bsddb/test/test_dbshelve.py2
-rw-r--r--Lib/bsddb/test/test_dbtables.py2
-rw-r--r--Lib/bsddb/test/test_env_close.py2
-rw-r--r--Lib/bsddb/test/test_get_none.py2
-rw-r--r--Lib/bsddb/test/test_join.py2
-rw-r--r--Lib/bsddb/test/test_lock.py2
-rw-r--r--Lib/bsddb/test/test_queue.py2
-rw-r--r--Lib/bsddb/test/test_recno.py2
-rw-r--r--Lib/bsddb/test/test_sequence.py2
-rw-r--r--Lib/bsddb/test/test_thread.py2
15 files changed, 21 insertions, 16 deletions
diff --git a/Lib/bsddb/test/test_all.py b/Lib/bsddb/test/test_all.py
index ad8b1e9..0b132f4 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 05ef83c..33a7837 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 d6d507f..f7f4c2d 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 59a45ec..ccf8b83 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 b108db4..841e01c 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 722ee5b..bb85bf7 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 26e3d36..2ff93a3 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 c112941..43dcabe 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 5f09cec..d1b69c7 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 69a1e9d..6e98b0b 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 7d77798..53f11a8 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 95cf20d..4226c9e 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 f1ea56a..170448e 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 979f858..48631a3 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 31964f0..f187413 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