From 9d72bb452bced3a100f07f8a9e30c4495a9ec41a Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Tue, 17 Apr 2007 08:48:32 +0000 Subject: 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 --- Lib/bsddb/test/test_associate.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Lib/bsddb/test/test_associate.py') 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): -- cgit v1.2.1