from .test_all import verbose
DASH = b'-'
-
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
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)
c2.close()
c3.close()
+ d1.close()
d2.close()
d3.close()
other = other.value
return value < other
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
+
class DBShelveTestCase(unittest.TestCase):
def setUp(self):
self.filename = tempfile.mktemp()
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
from .test_all import verbose
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
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)
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)
from .test_all import verbose
+letters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'
#----------------------------------------------------------------------
print("before appends" + '-' * 30)
pprint(d.stat())
- for x in string.letters:
+ for x in letters:
d.append(x * 40)
assert len(d) == 52
print("before appends" + '-' * 30)
pprint(d.stat())
- for x in string.letters:
+ for x in letters:
d.append(x * 40)
assert len(d) == 52