summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_associate.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_associate.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_associate.py')
-rw-r--r--Lib/bsddb/test/test_associate.py36
1 files changed, 18 insertions, 18 deletions
diff --git a/Lib/bsddb/test/test_associate.py b/Lib/bsddb/test/test_associate.py
index 7ae7c53..857cd3d 100644
--- a/Lib/bsddb/test/test_associate.py
+++ b/Lib/bsddb/test/test_associate.py
@@ -114,9 +114,9 @@ class AssociateErrorTestCase(unittest.TestCase):
def test00_associateDBError(self):
if verbose:
- print '\n', '-=' * 30
- print "Running %s.test00_associateDBError..." % \
- self.__class__.__name__
+ print('\n', '-=' * 30)
+ print("Running %s.test00_associateDBError..." % \
+ self.__class__.__name__)
dupDB = db.DB(self.env)
dupDB.set_flags(db.DB_DUP)
@@ -207,9 +207,9 @@ class AssociateTestCase(unittest.TestCase):
def test01_associateWithDB(self):
if verbose:
- print '\n', '-=' * 30
- print "Running %s.test01_associateWithDB..." % \
- self.__class__.__name__
+ print('\n', '-=' * 30)
+ print("Running %s.test01_associateWithDB..." % \
+ self.__class__.__name__)
self.createDB()
@@ -227,9 +227,9 @@ class AssociateTestCase(unittest.TestCase):
def test02_associateAfterDB(self):
if verbose:
- print '\n', '-=' * 30
- print "Running %s.test02_associateAfterDB..." % \
- self.__class__.__name__
+ print('\n', '-=' * 30)
+ print("Running %s.test02_associateAfterDB..." % \
+ self.__class__.__name__)
self.createDB()
self.addDataToDB(self.getDB())
@@ -257,7 +257,7 @@ class AssociateTestCase(unittest.TestCase):
vals[1].index('unknown')
if verbose:
- print "Primary key traversal:"
+ print("Primary key traversal:")
self.cur = self.getDB().cursor(txn)
count = 0
rec = self.cur.first()
@@ -268,13 +268,13 @@ class AssociateTestCase(unittest.TestCase):
assert rec[0] and type(rec[0]) == type(0)
count = count + 1
if verbose:
- print rec
+ print(rec)
rec = self.cur.next()
assert count == len(musicdata) # all items accounted for
if verbose:
- print "Secondary key traversal:"
+ print("Secondary key traversal:")
self.cur = secDB.cursor(txn)
count = 0
@@ -294,7 +294,7 @@ class AssociateTestCase(unittest.TestCase):
while rec is not None:
count = count + 1
if verbose:
- print rec
+ print(rec)
rec = self.cur.next()
# all items accounted for EXCEPT for 1 with "Blues" genre
assert count == len(musicdata)-1
@@ -304,7 +304,7 @@ class AssociateTestCase(unittest.TestCase):
def getGenre(self, priKey, priData):
assert type(priData) == type("")
if verbose:
- print 'getGenre key: %r data: %r' % (priKey, priData)
+ print('getGenre key: %r data: %r' % (priKey, priData))
genre = string.split(priData, '|')[2]
if genre == 'Blues':
return db.DB_DONOTINDEX
@@ -343,9 +343,9 @@ class AssociateBTreeTxnTestCase(AssociateBTreeTestCase):
def test13_associate_in_transaction(self):
if verbose:
- print '\n', '-=' * 30
- print "Running %s.test13_associateAutoCommit..." % \
- self.__class__.__name__
+ print('\n', '-=' * 30)
+ print("Running %s.test13_associateAutoCommit..." % \
+ self.__class__.__name__)
txn = self.env.txn_begin()
try:
@@ -389,7 +389,7 @@ class ShelveAssociateTestCase(AssociateTestCase):
def getGenre(self, priKey, priData):
assert type(priData) == type(())
if verbose:
- print 'getGenre key: %r data: %r' % (priKey, priData)
+ print('getGenre key: %r data: %r' % (priKey, priData))
genre = priData[2]
if genre == 'Blues':
return db.DB_DONOTINDEX