1.1 --- a/test_read.py Mon Oct 03 00:17:53 2011 +0200
1.2 +++ b/test_read.py Mon Oct 03 00:34:30 2011 +0200
1.3 @@ -30,9 +30,18 @@
1.4
1.5 # Now use the index.
1.6
1.7 + index = IndexedFile(f, l, accessor.get_key)
1.8 +
1.9 for term in terms:
1.10 +
1.11 + # Convert the term to the appropriate type.
1.12 +
1.13 + term = accessor.convert(term)
1.14 +
1.15 + # Perform the search.
1.16 +
1.17 t = time.time()
1.18 - line = find_with_index(f, accessor.get_key, l, accessor.convert(term))
1.19 + line = index.find(term)
1.20 if line:
1.21 print "Found (at %s seconds)...\n%s" % (time.time() - t, line)
1.22