summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/test/test_associate.py
diff options
context:
space:
mode:
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 857cd3d..d8c9c0c 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):