summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2004-02-12 17:35:32 (GMT)
commit70a6b49821a3226f55e9716f32d802d06640cb89 (patch)
tree3c8ca10c1fa09e025bd266cf855a00d7d96c55aa /Lib/bsddb/test
parentecfeb7f095dfd9c1c8929bf3df858ee35e0d9e9e (diff)
downloadcpython-70a6b49821a3226f55e9716f32d802d06640cb89.zip
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.gz
cpython-70a6b49821a3226f55e9716f32d802d06640cb89.tar.bz2
Replace backticks with repr() or "%r"
From SF patch #852334.
Diffstat (limited to 'Lib/bsddb/test')
-rw-r--r--Lib/bsddb/test/test_associate.py4
-rw-r--r--Lib/bsddb/test/test_basics.py8
-rw-r--r--Lib/bsddb/test/test_dbtables.py2
3 files changed, 7 insertions, 7 deletions
diff --git a/Lib/bsddb/test/test_associate.py b/Lib/bsddb/test/test_associate.py
index f810eb0..fc92c22 100644
--- a/Lib/bsddb/test/test_associate.py
+++ b/Lib/bsddb/test/test_associate.py
@@ -200,7 +200,7 @@ class AssociateTestCase(unittest.TestCase):
def getGenre(self, priKey, priData):
assert type(priData) == type("")
if verbose:
- print 'getGenre key:', `priKey`, 'data:', `priData`
+ print 'getGenre key: %r data: %r' % (priKey, priData)
genre = string.split(priData, '|')[2]
if genre == 'Blues':
return db.DB_DONOTINDEX
@@ -242,7 +242,7 @@ class ShelveAssociateTestCase(AssociateTestCase):
def getGenre(self, priKey, priData):
assert type(priData) == type(())
if verbose:
- print 'getGenre key:', `priKey`, 'data:', `priData`
+ print 'getGenre key: %r data: %r' % (priKey, priData)
genre = priData[2]
if genre == 'Blues':
return db.DB_DONOTINDEX
diff --git a/Lib/bsddb/test/test_basics.py b/Lib/bsddb/test/test_basics.py
index d757b34..da7e18f 100644
--- a/Lib/bsddb/test/test_basics.py
+++ b/Lib/bsddb/test/test_basics.py
@@ -361,7 +361,7 @@ class BasicTestCase(unittest.TestCase):
if set_raises_error:
self.fail("expected exception")
if n != None:
- self.fail("expected None: "+`n`)
+ self.fail("expected None: %r" % (n,))
rec = c.get_both('0404', self.makeData('0404'))
assert rec == ('0404', self.makeData('0404'))
@@ -375,7 +375,7 @@ class BasicTestCase(unittest.TestCase):
if get_raises_error:
self.fail("expected exception")
if n != None:
- self.fail("expected None: "+`n`)
+ self.fail("expected None: %r" % (n,))
if self.d.get_type() == db.DB_BTREE:
rec = c.set_range('011')
@@ -548,7 +548,7 @@ class BasicTestCase(unittest.TestCase):
num = d.truncate()
assert num >= 1, "truncate returned <= 0 on non-empty database"
num = d.truncate()
- assert num == 0, "truncate on empty DB returned nonzero (%s)" % `num`
+ assert num == 0, "truncate on empty DB returned nonzero (%r)" % (num,)
#----------------------------------------------------------------------
@@ -674,7 +674,7 @@ class BasicTransactionTestCase(BasicTestCase):
num = d.truncate(txn)
assert num >= 1, "truncate returned <= 0 on non-empty database"
num = d.truncate(txn)
- assert num == 0, "truncate on empty DB returned nonzero (%s)" % `num`
+ assert num == 0, "truncate on empty DB returned nonzero (%r)" % (num,)
txn.commit()
#----------------------------------------
diff --git a/Lib/bsddb/test/test_dbtables.py b/Lib/bsddb/test/test_dbtables.py
index eb5758f..1128a5a 100644
--- a/Lib/bsddb/test/test_dbtables.py
+++ b/Lib/bsddb/test/test_dbtables.py
@@ -109,7 +109,7 @@ class TableDBTestCase(unittest.TestCase):
assert values[1]['Species'] == 'Penguin'
else :
if verbose:
- print "values=", `values`
+ print "values= %r" % (values,)
raise "Wrong values returned!"
def test03(self):