[Python-3000-checkins] r57649 - python/branches/py3k/Lib/bsddb/test/test_dbtables.py python/branches/py3k/Lib/bsddb/test/test_queue.py python/branches/py3k/Lib/bsddb/test/test_recno.py

neal.norwitz python-3000-checkins at python.org
Wed Aug 29 07:52:49 CEST 2007


Author: neal.norwitz
Date: Wed Aug 29 07:52:49 2007
New Revision: 57649

Modified:
   python/branches/py3k/Lib/bsddb/test/test_dbtables.py
   python/branches/py3k/Lib/bsddb/test/test_queue.py
   python/branches/py3k/Lib/bsddb/test/test_recno.py
Log:
Get test_bsddb3 passing

Modified: python/branches/py3k/Lib/bsddb/test/test_dbtables.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_dbtables.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_dbtables.py	Wed Aug 29 07:52:49 2007
@@ -326,7 +326,7 @@
             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

Modified: python/branches/py3k/Lib/bsddb/test/test_queue.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_queue.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_queue.py	Wed Aug 29 07:52:49 2007
@@ -47,7 +47,7 @@
             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 @@
             pprint(d.stat())
 
         for x in letters:
-            d.append(bytes(x) * 40)
+            d.append(x.encode('ascii') * 40)
 
         assert len(d) == 52
 

Modified: python/branches/py3k/Lib/bsddb/test/test_recno.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_recno.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_recno.py	Wed Aug 29 07:52:49 2007
@@ -44,7 +44,7 @@
         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 @@
 
         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 @@
         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
 


More information about the Python-3000-checkins mailing list