summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_queue.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2007-08-23 07:32:27 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2007-08-23 07:32:27 (GMT)
commit361ed15383845bffc017b6a14acfb9da8f63ef73 (patch)
tree808d7729ad334a8b32e31fca6acd1edf010d7398 /Lib/bsddb/test/test_queue.py
parente5a8dc684ce67578f1bac94c1a76fea659d4ace7 (diff)
downloadcpython-361ed15383845bffc017b6a14acfb9da8f63ef73.zip
cpython-361ed15383845bffc017b6a14acfb9da8f63ef73.tar.gz
cpython-361ed15383845bffc017b6a14acfb9da8f63ef73.tar.bz2
Require strict bytes objects for all bsddb.db input values.
Diffstat (limited to 'Lib/bsddb/test/test_queue.py')
-rw-r--r--Lib/bsddb/test/test_queue.py24
1 files changed, 12 insertions, 12 deletions
diff --git a/Lib/bsddb/test/test_queue.py b/Lib/bsddb/test/test_queue.py
index e20737e..2cf5a8c 100644
--- a/Lib/bsddb/test/test_queue.py
+++ b/Lib/bsddb/test/test_queue.py
@@ -47,14 +47,14 @@ class SimpleQueueTestCase(unittest.TestCase):
pprint(d.stat())
for x in letters:
- d.append(x * 40)
+ d.append(bytes(x) * 40)
assert len(d) == 52
- d.put(100, "some more data")
- d.put(101, "and some more ")
- d.put(75, "out of order")
- d.put(1, "replacement data")
+ d.put(100, b"some more data")
+ d.put(101, b"and some more ")
+ d.put(75, b"out of order")
+ d.put(1, b"replacement data")
assert len(d) == 55
@@ -71,7 +71,7 @@ class SimpleQueueTestCase(unittest.TestCase):
print("after open" + '-' * 30)
pprint(d.stat())
- d.append("one more")
+ d.append(b"one more")
c = d.cursor()
if verbose:
@@ -119,14 +119,14 @@ class SimpleQueueTestCase(unittest.TestCase):
pprint(d.stat())
for x in letters:
- d.append(x * 40)
+ d.append(bytes(x) * 40)
assert len(d) == 52
- d.put(100, "some more data")
- d.put(101, "and some more ")
- d.put(75, "out of order")
- d.put(1, "replacement data")
+ d.put(100, b"some more data")
+ d.put(101, b"and some more ")
+ d.put(75, b"out of order")
+ d.put(1, b"replacement data")
assert len(d) == 55
@@ -144,7 +144,7 @@ class SimpleQueueTestCase(unittest.TestCase):
print("after open" + '-' * 30)
pprint(d.stat())
- d.append("one more")
+ d.append(b"one more")
if verbose:
print("after append" + '-' * 30)