[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/tests - testUnicodeSplitter.py:1.1.4.1
Tres Seaver
tseaver@zope.com
Sat, 13 Oct 2001 16:24:21 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/tests
In directory cvs.zope.org:/tmp/cvs-serv23103/TextIndex/Splitter/UnicodeSplitter/tests
Modified Files:
Tag: tseaver-pxtestcleanup-branch
testUnicodeSplitter.py
Log Message:
- Refactored tests into subdirectories under their respective packages.
- Removed dependency of tests on 'execfile( "framework.py" )'
- TextIndex/TextIndex.py: replaced corrected use of 'insintance', rather
than using 'type'.
- Ensured that tests which need to catch logged errors don't leave
the logger in a hosed state.
=== Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/tests/testUnicodeSplitter.py 1.1 => 1.1.4.1 ===
-execfile(os.path.join(sys.path[0],'framework.py'))
+import os, sys, unittest
-from UnicodeSplitter import UnicodeSplitter
+from Products.PluginIndexes.TextIndex.Splitter.UnicodeSplitter.UnicodeSplitter \
+ import UnicodeSplitter
class UnicodeSplitterTests(unittest.TestCase):
def setUp(self):
texts = ('The quick brown fox jumps over the lazy dog',
- 'Bei den dreitägigen Angriffen seien auch bis auf einen alle Flugplätze der Taliban zerstört worden',
+ 'Bei den dreitägigen Angriffen seien auch bis auf einen '
+ 'alle Flugplätze der Taliban zerstört worden',
)
self.testdata = []
@@ -43,4 +44,5 @@
raise AssertionError
-framework()
+def test_suite():
+ return unittest.makeSuite( UnicodeSplitterTests )