summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2007-08-22 19:23:36 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2007-08-22 19:23:36 (GMT)
commit0e6012cbf3ce7a5e716ed55f4941b910d9a9c2f9 (patch)
tree4c9e698b99fde4b749decc83948c77137e50e680 /Lib
parentea03c11655dbe5a421e3ad342039c721bceeb096 (diff)
downloadcpython-0e6012cbf3ce7a5e716ed55f4941b910d9a9c2f9.zip
cpython-0e6012cbf3ce7a5e716ed55f4941b910d9a9c2f9.tar.gz
cpython-0e6012cbf3ce7a5e716ed55f4941b910d9a9c2f9.tar.bz2
Eat some low hanging fruit... let the test suite run.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/bsddb/test/test_basics.py5
-rw-r--r--Lib/bsddb/test/test_dbshelve.py4
-rw-r--r--Lib/bsddb/test/test_get_none.py5
-rw-r--r--Lib/bsddb/test/test_queue.py5
4 files changed, 12 insertions, 7 deletions
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py
index 4f8eaea..7bfe03b 100644
--- a/Lib/bsddb/test/test_basics.py
+++ b/Lib/bsddb/test/test_basics.py
@@ -23,7 +23,7 @@ except ImportError:
from .test_all import verbose
DASH = b'-'
-
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
@@ -886,7 +886,7 @@ class BasicMultiDBTestCase(BasicTestCase):
x = x.encode("ascii")
d2.put(x, self.makeData(x))
- for x in string.letters:
+ for x in letters:
x = x.encode("ascii")
d3.put(x, x*70)
@@ -942,6 +942,7 @@ class BasicMultiDBTestCase(BasicTestCase):
c2.close()
c3.close()
+ d1.close()
d2.close()
d3.close()
diff --git a/Lib/bsddb/test/test_dbshelve.py b/Lib/bsddb/test/test_dbshelve.py
index f773156..3747dce 100644
--- a/Lib/bsddb/test/test_dbshelve.py
+++ b/Lib/bsddb/test/test_dbshelve.py
@@ -37,6 +37,8 @@ class DataClass:
other = other.value
return value < other
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+
class DBShelveTestCase(unittest.TestCase):
def setUp(self):
self.filename = tempfile.mktemp()
@@ -50,7 +52,7 @@ class DBShelveTestCase(unittest.TestCase):
pass
def populateDB(self, d):
- for x in string.letters:
+ for x in letters:
d[('S' + x).encode("ascii")] = 10 * x # add a string
d[('I' + x).encode("ascii")] = ord(x) # add an integer
d[('L' + x).encode("ascii")] = [x] * 10 # add a list
diff --git a/Lib/bsddb/test/test_get_none.py b/Lib/bsddb/test/test_get_none.py
index 63130d5..8829944 100644
--- a/Lib/bsddb/test/test_get_none.py
+++ b/Lib/bsddb/test/test_get_none.py
@@ -11,6 +11,7 @@ from bsddb import db
from .test_all import verbose
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
@@ -30,7 +31,7 @@ class GetReturnsNoneTestCase(unittest.TestCase):
d.open(self.filename, db.DB_BTREE, db.DB_CREATE)
d.set_get_returns_none(1)
- for x in string.letters:
+ for x in letters:
x = x.encode("ascii")
d.put(x, x * 40)
@@ -59,7 +60,7 @@ class GetReturnsNoneTestCase(unittest.TestCase):
d.open(self.filename, db.DB_BTREE, db.DB_CREATE)
d.set_get_returns_none(0)
- for x in string.letters:
+ for x in letters:
x = x.encode("ascii")
d.put(x, x * 40)
diff --git a/Lib/bsddb/test/test_queue.py b/Lib/bsddb/test/test_queue.py
index 9f80b43..e20737e 100644
--- a/Lib/bsddb/test/test_queue.py
+++ b/Lib/bsddb/test/test_queue.py
@@ -16,6 +16,7 @@ except ImportError:
from .test_all import verbose
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
@@ -45,7 +46,7 @@ class SimpleQueueTestCase(unittest.TestCase):
print("before appends" + '-' * 30)
pprint(d.stat())
- for x in string.letters:
+ for x in letters:
d.append(x * 40)
assert len(d) == 52
@@ -117,7 +118,7 @@ class SimpleQueueTestCase(unittest.TestCase):
print("before appends" + '-' * 30)
pprint(d.stat())
- for x in string.letters:
+ for x in letters:
d.append(x * 40)
assert len(d) == 52