summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_compat.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_compat.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_compat.py')
-rw-r--r--Lib/bsddb/test/test_compat.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/Lib/bsddb/test/test_compat.py b/Lib/bsddb/test/test_compat.py
index af9e128..7561f9f 100644
--- a/Lib/bsddb/test/test_compat.py
+++ b/Lib/bsddb/test/test_compat.py
@@ -37,7 +37,7 @@ class CompatibilityTestCase(unittest.TestCase):
def test03_rnopen(self):
data = string.split("The quick brown fox jumped over the lazy dog.")
if verbose:
- print "\nTesting: rnopen"
+ print("\nTesting: rnopen")
f = rnopen(self.filename, 'c')
for x in range(len(data)):
@@ -45,7 +45,7 @@ class CompatibilityTestCase(unittest.TestCase):
getTest = (f[1], f[2], f[3])
if verbose:
- print '%s %s %s' % getTest
+ print('%s %s %s' % getTest)
assert getTest[1] == 'quick', 'data mismatch!'
@@ -73,7 +73,7 @@ class CompatibilityTestCase(unittest.TestCase):
rec = f.first()
while rec:
if verbose:
- print rec
+ print(rec)
try:
rec = f.next()
except KeyError:
@@ -89,17 +89,17 @@ class CompatibilityTestCase(unittest.TestCase):
def do_bthash_test(self, factory, what):
if verbose:
- print '\nTesting: ', what
+ print('\nTesting: ', what)
f = factory(self.filename, 'c')
if verbose:
- print 'creation...'
+ print('creation...')
# truth test
if f:
- if verbose: print "truth test: true"
+ if verbose: print("truth test: true")
else:
- if verbose: print "truth test: false"
+ if verbose: print("truth test: false")
f['0'] = ''
f['a'] = 'Guido'
@@ -109,10 +109,10 @@ class CompatibilityTestCase(unittest.TestCase):
# 'e' intentionally left out
f['f'] = 'Python'
if verbose:
- print '%s %s %s' % (f['a'], f['b'], f['c'])
+ print('%s %s %s' % (f['a'], f['b'], f['c']))
if verbose:
- print 'key ordering...'
+ print('key ordering...')
start = f.set_location(f.first()[0])
if start != ('0', ''):
self.fail("incorrect first() result: "+repr(start))
@@ -124,7 +124,7 @@ class CompatibilityTestCase(unittest.TestCase):
f.previous()
break
if verbose:
- print rec
+ print(rec)
assert f.has_key('f'), 'Error, missing key!'
@@ -147,9 +147,9 @@ class CompatibilityTestCase(unittest.TestCase):
# truth test
try:
if f:
- if verbose: print "truth test: true"
+ if verbose: print("truth test: true")
else:
- if verbose: print "truth test: false"
+ if verbose: print("truth test: false")
except db.DBError:
pass
else:
@@ -158,16 +158,16 @@ class CompatibilityTestCase(unittest.TestCase):
del f
if verbose:
- print 'modification...'
+ print('modification...')
f = factory(self.filename, 'w')
f['d'] = 'discovered'
if verbose:
- print 'access...'
+ print('access...')
for key in f.keys():
word = f[key]
if verbose:
- print word
+ print(word)
def noRec(f):
rec = f['no such key']