[Python-3000-checkins] r57281 - python/branches/py3k/Lib/bsddb/test/test_basics.py python/branches/py3k/Lib/bsddb/test/test_dbshelve.py python/branches/py3k/Lib/bsddb/test/test_get_none.py python/branches/py3k/Lib/bsddb/test/test_queue.py

gregory.p.smith python-3000-checkins at python.org
Wed Aug 22 21:23:37 CEST 2007


Author: gregory.p.smith
Date: Wed Aug 22 21:23:36 2007
New Revision: 57281

Modified:
   python/branches/py3k/Lib/bsddb/test/test_basics.py
   python/branches/py3k/Lib/bsddb/test/test_dbshelve.py
   python/branches/py3k/Lib/bsddb/test/test_get_none.py
   python/branches/py3k/Lib/bsddb/test/test_queue.py
Log:
Eat some low hanging fruit... let the test suite run.


Modified: python/branches/py3k/Lib/bsddb/test/test_basics.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_basics.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_basics.py	Wed Aug 22 21:23:36 2007
@@ -23,7 +23,7 @@
 from .test_all import verbose
 
 DASH = b'-'
-
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 #----------------------------------------------------------------------
 
@@ -886,7 +886,7 @@
             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 @@
         c2.close()
         c3.close()
 
+        d1.close()
         d2.close()
         d3.close()
 

Modified: python/branches/py3k/Lib/bsddb/test/test_dbshelve.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_dbshelve.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_dbshelve.py	Wed Aug 22 21:23:36 2007
@@ -37,6 +37,8 @@
             other = other.value
         return value < other
 
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+
 class DBShelveTestCase(unittest.TestCase):
     def setUp(self):
         self.filename = tempfile.mktemp()
@@ -50,7 +52,7 @@
             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

Modified: python/branches/py3k/Lib/bsddb/test/test_get_none.py
==============================================================================
--- python/branches/py3k/Lib/bsddb/test/test_get_none.py	(original)
+++ python/branches/py3k/Lib/bsddb/test/test_get_none.py	Wed Aug 22 21:23:36 2007
@@ -11,6 +11,7 @@
 
 from .test_all import verbose
 
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 #----------------------------------------------------------------------
 
@@ -30,7 +31,7 @@
         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 @@
         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)
 

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 22 21:23:36 2007
@@ -16,6 +16,7 @@
 
 from .test_all import verbose
 
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
 
 #----------------------------------------------------------------------
 
@@ -45,7 +46,7 @@
             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 @@
             print("before appends" + '-' * 30)
             pprint(d.stat())
 
-        for x in string.letters:
+        for x in letters:
             d.append(x * 40)
 
         assert len(d) == 52


More information about the Python-3000-checkins mailing list