[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/tests - __init__.py:1.1 testUnicodeSplitter.py:1.3
Tres Seaver
tseaver@zope.com
Wed, 17 Oct 2001 21:06:08 -0400
Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/tests
In directory cvs.zope.org:/tmp/cvs-serv29449
Modified Files:
testUnicodeSplitter.py
Added Files:
__init__.py
Log Message:
- Packagize tests directory.
- Add remaining testing scaffolding.
=== Added File Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/tests/__init__.py ===
# Nothing to see here.
=== Zope/lib/python/Products/PluginIndexes/TextIndex/Splitter/UnicodeSplitter/tests/testUnicodeSplitter.py 1.2 => 1.3 ===
fields = list(UnicodeSplitter(text,sw_dict))
- if fields != expected:
- for i in range(min(len(fields),len(expected))):
- print fields[i],expected[i]
-
- raise AssertionError
+ self.assertEquals( fields, expected )
def test_suite():
return unittest.makeSuite(UnicodeSplitterTests)
+
+def debug():
+ return test_suite().debug()
+
+def pdebug():
+ import pdb
+ pdb.run('debug()')
+
+def main():
+ unittest.TextTestRunner().run( test_suite() )
+
+if __name__ == '__main__':
+ if len(sys.argv) > 1:
+ globals()[sys.argv[1]]()
+ else:
+ main()