summaryrefslogtreecommitdiff
path: root/Lib/bsddb/test/test_associate.py
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2007-04-17 08:48:32 +0000
committerNeal Norwitz <nnorwitz@gmail.com>2007-04-17 08:48:32 +0000
commit9d72bb452bced3a100f07f8a9e30c4495a9ec41a (patch)
treec39762a764fcc16f2cfc42e2504e58ff31e159e6 /Lib/bsddb/test/test_associate.py
parentff11334927ee616d765b54a3851016b76a20bcec (diff)
downloadcpython-git-9d72bb452bced3a100f07f8a9e30c4495a9ec41a.tar.gz
Remove functions in string module that are also string methods. Also remove:
* all calls to functions in the string module (except maketrans) * everything from stropmodule except for maketrans() which is still used
Diffstat (limited to 'Lib/bsddb/test/test_associate.py')
-rw-r--r--Lib/bsddb/test/test_associate.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/bsddb/test/test_associate.py b/Lib/bsddb/test/test_associate.py
index 857cd3d0ae..d8c9c0c9b2 100644
--- a/Lib/bsddb/test/test_associate.py
+++ b/Lib/bsddb/test/test_associate.py
@@ -2,7 +2,7 @@
TestCases for DB.associate.
"""
-import sys, os, string
+import sys, os
import tempfile
import time
from pprint import pprint
@@ -177,7 +177,7 @@ class AssociateTestCase(unittest.TestCase):
for key, value in musicdata.items():
if type(self.keytype) == type(''):
key = "%02d" % key
- d.put(key, string.join(value, '|'), txn=txn)
+ d.put(key, '|'.join(value), txn=txn)
def createDB(self, txn=None):
self.cur = None
@@ -263,7 +263,7 @@ class AssociateTestCase(unittest.TestCase):
rec = self.cur.first()
while rec is not None:
if type(self.keytype) == type(''):
- assert string.atoi(rec[0]) # for primary db, key is a number
+ assert int(rec[0]) # for primary db, key is a number
else:
assert rec[0] and type(rec[0]) == type(0)
count = count + 1
@@ -305,7 +305,7 @@ class AssociateTestCase(unittest.TestCase):
assert type(priData) == type("")
if verbose:
print('getGenre key: %r data: %r' % (priKey, priData))
- genre = string.split(priData, '|')[2]
+ genre = priData.split('|')[2]
if genre == 'Blues':
return db.DB_DONOTINDEX
else:
@@ -427,13 +427,13 @@ class ThreadedAssociateTestCase(AssociateTestCase):
for key, value in musicdata.items():
if type(self.keytype) == type(''):
key = "%02d" % key
- d.put(key, string.join(value, '|'))
+ d.put(key, '|'.join(value))
def writer2(self, d):
for x in range(100, 600):
key = 'z%2d' % x
value = [key] * 4
- d.put(key, string.join(value, '|'))
+ d.put(key, '|'.join(value))
class ThreadedAssociateHashTestCase(ShelveAssociateTestCase):