[Zope3-checkins] CVS: Zope3/src/zope/textindex/tests - indexhtml.py:1.1.2.2 test_queryengine.py:1.1.2.2 test_textindexwrapper.py:1.1.2.2
Fred L. Drake, Jr.
fred@zope.com
Mon, 23 Dec 2002 17:01:05 -0500
Update of /cvs-repository/Zope3/src/zope/textindex/tests
In directory cvs.zope.org:/tmp/cvs-serv16014/tests
Modified Files:
Tag: NameGeddon-branch
indexhtml.py test_queryengine.py test_textindexwrapper.py
Log Message:
Update to the New World Naming.
=== Zope3/src/zope/textindex/tests/indexhtml.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/textindex/tests/indexhtml.py:1.1.2.1 Mon Dec 23 14:33:35 2002
+++ Zope3/src/zope/textindex/tests/indexhtml.py Mon Dec 23 17:01:04 2002
@@ -15,9 +15,9 @@
import zodb
from zodb.storage.file import FileStorage
-from BTrees.IOBTree import IOBTree
+from zodb.btrees.IOBTree import IOBTree
-from Zope.TextIndex.ZCTextIndex import ZCTextIndex
+from zope.textindex.textindexwrapper import TextIndexWrapper
from zope.textindex.htmlsplitter import HTMLWordSplitter
from zope.textindex.lexicon import Lexicon, StopWordRemover
=== Zope3/src/zope/textindex/tests/test_queryengine.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/textindex/tests/test_queryengine.py:1.1.2.1 Mon Dec 23 14:33:35 2002
+++ Zope3/src/zope/textindex/tests/test_queryengine.py Mon Dec 23 17:01:04 2002
@@ -12,7 +12,7 @@
#
##############################################################################
-from unittest import TestCase, TestSuite, main, makeSuite
+import unittest
from zodb.btrees.IIBTree import IIBucket
@@ -32,7 +32,7 @@
b[1] = b[2] = b[3] = b[4] = 1
return b
-class TestQueryEngine(TestCase):
+class TestQueryEngine(unittest.TestCase):
def setUp(self):
self.lexicon = Lexicon(Splitter())
@@ -66,7 +66,7 @@
self.assertRaises(QueryError, tree.executeQuery, self.index)
def test_suite():
- return makeSuite(TestQueryEngine)
+ return unittest.makeSuite(TestQueryEngine)
if __name__=='__main__':
- main(defaultTest='test_suite')
+ unittest.main(defaultTest='test_suite')
=== Zope3/src/zope/textindex/tests/test_textindexwrapper.py 1.1.2.1 => 1.1.2.2 ===
--- Zope3/src/zope/textindex/tests/test_textindexwrapper.py:1.1.2.1 Mon Dec 23 14:33:35 2002
+++ Zope3/src/zope/textindex/tests/test_textindexwrapper.py Mon Dec 23 17:01:04 2002
@@ -16,12 +16,12 @@
$Id$
"""
-from unittest import TestCase, TestSuite, main, makeSuite
+import unittest
from zope.textindex.textindexwrapper import TextIndexWrapper
-from Zope.TextIndex import ParseTree
+from zope.textindex import parsetree
-class Test(TestCase):
+class TextIndexWrapperTest(unittest.TestCase):
def setUp(self):
w = TextIndexWrapper()
@@ -94,7 +94,7 @@
self.assertEqual(total, 1)
[(docid, rank)] = matches # if this fails there's a problem
self.assertEqual(docid, 1002)
- self.assertRaises(ParseTree.ParseError,
+ self.assertRaises(parsetree.ParseError,
self.wrapper.query, emdash, 0, 10)
matches, total = self.wrapper.query(lamda, 0, 10)
self.assertEqual(total, 0)
@@ -125,7 +125,7 @@
self.assertEqual(matches[1][0], 1001)
def test_suite():
- return makeSuite(Test)
+ return unittest.makeSuite(TextIndexWrapperTest)
if __name__=='__main__':
- main(defaultTest='test_suite')
+ unittest.main(defaultTest='test_suite')