Eat some low hanging fruit... let the test suite run.

This commit is contained in:
Gregory P. Smith 2007-08-22 19:23:36 +00:00
parent ea03c11655
commit 0e6012cbf3
4 changed files with 12 additions and 7 deletions

View File

@ -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()

View File

@ -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

View File

@ -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)

View File

@ -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