summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_queue.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
committerGuido van Rossum <guido@python.org>2007-02-09 05:37:30 (GMT)
commitbe19ed77ddb047e02fe94d142181062af6d99dcc (patch)
tree70f214e06554046fcccbadeb78665f25e07ce965 /Lib/bsddb/test/test_queue.py
parent452bf519a70c3db0e7f0d2540b1bfb07d9085583 (diff)
downloadcpython-be19ed77ddb047e02fe94d142181062af6d99dcc.zip
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.gz
cpython-be19ed77ddb047e02fe94d142181062af6d99dcc.tar.bz2
Fix most trivially-findable print statements.
There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
Diffstat (limited to 'Lib/bsddb/test/test_queue.py')
-rw-r--r--Lib/bsddb/test/test_queue.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/Lib/bsddb/test/test_queue.py b/Lib/bsddb/test/test_queue.py
index 4226c9e..9f80b43 100644
--- a/Lib/bsddb/test/test_queue.py
+++ b/Lib/bsddb/test/test_queue.py
@@ -34,15 +34,15 @@ class SimpleQueueTestCase(unittest.TestCase):
# Basic Queue tests using the deprecated DBCursor.consume method.
if verbose:
- print '\n', '-=' * 30
- print "Running %s.test01_basic..." % self.__class__.__name__
+ print('\n', '-=' * 30)
+ print("Running %s.test01_basic..." % self.__class__.__name__)
d = db.DB()
d.set_re_len(40) # Queues must be fixed length
d.open(self.filename, db.DB_QUEUE, db.DB_CREATE)
if verbose:
- print "before appends" + '-' * 30
+ print("before appends" + '-' * 30)
pprint(d.stat())
for x in string.letters:
@@ -58,7 +58,7 @@ class SimpleQueueTestCase(unittest.TestCase):
assert len(d) == 55
if verbose:
- print "before close" + '-' * 30
+ print("before close" + '-' * 30)
pprint(d.stat())
d.close()
@@ -67,25 +67,25 @@ class SimpleQueueTestCase(unittest.TestCase):
d.open(self.filename)
if verbose:
- print "after open" + '-' * 30
+ print("after open" + '-' * 30)
pprint(d.stat())
d.append("one more")
c = d.cursor()
if verbose:
- print "after append" + '-' * 30
+ print("after append" + '-' * 30)
pprint(d.stat())
rec = c.consume()
while rec:
if verbose:
- print rec
+ print(rec)
rec = c.consume()
c.close()
if verbose:
- print "after consume loop" + '-' * 30
+ print("after consume loop" + '-' * 30)
pprint(d.stat())
assert len(d) == 0, \
@@ -101,12 +101,12 @@ class SimpleQueueTestCase(unittest.TestCase):
# (No cursor needed)
if verbose:
- print '\n', '-=' * 30
- print "Running %s.test02_basicPost32..." % self.__class__.__name__
+ print('\n', '-=' * 30)
+ print("Running %s.test02_basicPost32..." % self.__class__.__name__)
if db.version() < (3, 2, 0):
if verbose:
- print "Test not run, DB not new enough..."
+ print("Test not run, DB not new enough...")
return
d = db.DB()
@@ -114,7 +114,7 @@ class SimpleQueueTestCase(unittest.TestCase):
d.open(self.filename, db.DB_QUEUE, db.DB_CREATE)
if verbose:
- print "before appends" + '-' * 30
+ print("before appends" + '-' * 30)
pprint(d.stat())
for x in string.letters:
@@ -130,7 +130,7 @@ class SimpleQueueTestCase(unittest.TestCase):
assert len(d) == 55
if verbose:
- print "before close" + '-' * 30
+ print("before close" + '-' * 30)
pprint(d.stat())
d.close()
@@ -140,23 +140,23 @@ class SimpleQueueTestCase(unittest.TestCase):
#d.set_get_returns_none(true)
if verbose:
- print "after open" + '-' * 30
+ print("after open" + '-' * 30)
pprint(d.stat())
d.append("one more")
if verbose:
- print "after append" + '-' * 30
+ print("after append" + '-' * 30)
pprint(d.stat())
rec = d.consume()
while rec:
if verbose:
- print rec
+ print(rec)
rec = d.consume()
if verbose:
- print "after consume loop" + '-' * 30
+ print("after consume loop" + '-' * 30)
pprint(d.stat())
d.close()