Commit 53b46dc9 authored by Guido van Rossum's avatar Guido van Rossum

setUp(): assign the lexicon to self.lexicon directly rather than

creating it anonymously and then pulling it out of the zc_index
object.
parent 0ff6d33b
......@@ -93,11 +93,10 @@ class ZCIndexTestsBase:
extra = Extra()
extra.doc_attr = 'text'
extra.lexicon_id = 'lexicon'
caller = LexiconHolder(Lexicon(Splitter(), CaseNormalizer(),
StopWordRemover()))
self.lexicon = Lexicon(Splitter(), CaseNormalizer(), StopWordRemover())
caller = LexiconHolder(self.lexicon)
self.zc_index = ZCTextIndex('name', extra, caller, self.IndexFactory)
self.index = self.zc_index.index
self.lexicon = self.zc_index.lexicon
def parserFailure(self, query):
self.assertRaises(ParseError, self.zc_index.query, query)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment