[Zope-Checkins] SVN: Zope/branches/tyam-unicodeSplitterPatch/src/Products/ZCTextIndex/tests/testLexicon.py Adding two tests for an additional hook on Lexicon.py.

2009-10-02 Thread Takeshi Yamamoto
Log message for revision 104742:
  Adding two tests for an additional hook on Lexicon.py.

Changed:
  U   
Zope/branches/tyam-unicodeSplitterPatch/src/Products/ZCTextIndex/tests/testLexicon.py

-=-
Modified: 
Zope/branches/tyam-unicodeSplitterPatch/src/Products/ZCTextIndex/tests/testLexicon.py
===
--- 
Zope/branches/tyam-unicodeSplitterPatch/src/Products/ZCTextIndex/tests/testLexicon.py
   2009-10-02 10:25:08 UTC (rev 104741)
+++ 
Zope/branches/tyam-unicodeSplitterPatch/src/Products/ZCTextIndex/tests/testLexicon.py
   2009-10-02 10:28:47 UTC (rev 104742)
@@ -94,6 +94,28 @@
 wids = lexicon.termToWordIds('boxes')
 self.assertEqual(wids, [0])
 
+def testTermToWordIdsWithProcess_post_glob(self):
+This test is for added process_post_grob
+class AddedSplitter(Splitter):
+def process_post_glob(self, lst):
+assert lst == ['dogs']
+return ['dogs']
+lexicon = Lexicon(AddedSplitter())
+wids = lexicon.sourceToWordIds('cats and dogs')
+wids = lexicon.termToWordIds('dogs')
+self.assertEqual(wids, [3])
+
+def testMissingTermToWordIdsWithProcess_post_glob(self):
+This test is for added process_post_grob
+class AddedSplitter(Splitter):
+def process_post_glob(self, lst):
+assert lst == ['dogs']
+return ['fox']
+lexicon = Lexicon(AddedSplitter())
+wids = lexicon.sourceToWordIds('cats and dogs')
+wids = lexicon.termToWordIds('dogs')
+self.assertEqual(wids, [0])
+
 def testOnePipelineElement(self):
 lexicon = Lexicon(Splitter(), StupidPipelineElement('dogs', 'fish'))
 wids = lexicon.sourceToWordIds('cats and dogs')

___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins


[Zope-Checkins] SVN: Zope/branches/2.12/src/Zope2/Startup/nt/ This appears to be cruft no longer used anywhere...

2009-10-02 Thread Chris Withers
Log message for revision 104744:
  This appears to be cruft no longer used anywhere...

Changed:
  D   Zope/branches/2.12/src/Zope2/Startup/nt/

-=-
___
Zope-Checkins maillist  -  Zope-Checkins@zope.org
https://mail.zope.org/mailman/listinfo/zope-checkins