diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-29 05:52:49 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-08-29 05:52:49 (GMT) |
commit | 39dce30b4c6749731911ca7ed518c2ea706c15ea (patch) | |
tree | fddf339ff0d036311addda47da70498154383f18 /Lib/bsddb | |
parent | e14841c19e284d05643370560d9d1b07ad87e658 (diff) | |
download | cpython-39dce30b4c6749731911ca7ed518c2ea706c15ea.zip cpython-39dce30b4c6749731911ca7ed518c2ea706c15ea.tar.gz cpython-39dce30b4c6749731911ca7ed518c2ea706c15ea.tar.bz2 |
Get test_bsddb3 passing
Diffstat (limited to 'Lib/bsddb')
-rw-r--r-- | Lib/bsddb/test/test_dbtables.py | 2 | ||||
-rw-r--r-- | Lib/bsddb/test/test_queue.py | 4 | ||||
-rw-r--r-- | Lib/bsddb/test/test_recno.py | 6 |
3 files changed, 6 insertions, 6 deletions
diff --git a/Lib/bsddb/test/test_dbtables.py b/Lib/bsddb/test/test_dbtables.py index ddb9644..149f3bd 100644 --- a/Lib/bsddb/test/test_dbtables.py +++ b/Lib/bsddb/test/test_dbtables.py @@ -326,7 +326,7 @@ class TableDBTestCase(unittest.TestCase): return type def increment_access(count): - return bytes(str(int(count)+1)) + return str(int(count)+1).encode('ascii') def remove_value(value): return None diff --git a/Lib/bsddb/test/test_queue.py b/Lib/bsddb/test/test_queue.py index dfae95b..12b9997 100644 --- a/Lib/bsddb/test/test_queue.py +++ b/Lib/bsddb/test/test_queue.py @@ -47,7 +47,7 @@ class SimpleQueueTestCase(unittest.TestCase): pprint(d.stat()) for x in letters: - d.append(bytes(x) * 40) + d.append(x.encode('ascii') * 40) assert len(d) == 52 @@ -119,7 +119,7 @@ class SimpleQueueTestCase(unittest.TestCase): pprint(d.stat()) for x in letters: - d.append(bytes(x) * 40) + d.append(x.encode('ascii') * 40) assert len(d) == 52 diff --git a/Lib/bsddb/test/test_recno.py b/Lib/bsddb/test/test_recno.py index 1ebaf79..e001b63 100644 --- a/Lib/bsddb/test/test_recno.py +++ b/Lib/bsddb/test/test_recno.py @@ -44,7 +44,7 @@ class SimpleRecnoTestCase(unittest.TestCase): d.open(self.filename, db.DB_RECNO, db.DB_CREATE) for x in letters: - recno = d.append(bytes(x) * 60) + recno = d.append(x.encode('ascii') * 60) assert type(recno) == type(0) assert recno >= 1 if verbose: @@ -219,7 +219,7 @@ class SimpleRecnoTestCase(unittest.TestCase): data = "The quick brown fox jumped over the lazy dog".split() for datum in data: - d.append(bytes(datum)) + d.append(datum.encode('ascii')) d.sync() d.close() @@ -261,7 +261,7 @@ class SimpleRecnoTestCase(unittest.TestCase): d.open(self.filename, db.DB_RECNO, db.DB_CREATE) for x in letters: - d.append(bytes(x) * 35) # These will be padded + d.append(x.encode('ascii') * 35) # These will be padded d.append(b'.' * 40) # this one will be exact |