[CMF-checkins] CVS: Products/CMFTopic/tests - test_Topic.py:1.8 test_all.py:1.3
Tres Seaver
tseaver@zope.com
Thu, 20 Sep 2001 12:52:01 -0400
Update of /cvs-repository/Products/CMFTopic/tests
In directory cvs.zope.org:/tmp/cvs-serv7461/CMFTopic/tests
Modified Files:
test_Topic.py test_all.py
Log Message:
- Fix unit test drivers to work with Zope 2.4 / Python 2.1 (unittest
module no longer has JUnitTestTextRunner).
=== Products/CMFTopic/tests/test_Topic.py 1.7 => 1.8 ===
def test_Empty( self ):
topic = Topic('top')
- assert len(topic._criteriaTypes) == 4
query = topic.buildQuery()
assert len( query ) == 0
=== Products/CMFTopic/tests/test_all.py 1.2 => 1.3 ===
def run():
- unittest.JUnitTextTestRunner().run(test_suite())
+ if hasattr( unittest, 'JUnitTextTestRunner' ):
+ unittest.JUnitTextTestRunner().run( test_suite() )
+ else:
+ unittest.TextTestRunner( verbosity=0 ).run( test_suite() )
if __name__ == '__main__':
run()