[CMF-checkins] CVS: Products/CMFTracker/tests - test_all.py:1.3

Tres Seaver tseaver@zope.com
Thu, 20 Sep 2001 12:52:01 -0400


Update of /cvs-repository/Products/CMFTracker/tests
In directory cvs.zope.org:/tmp/cvs-serv7461/CMFTracker/tests

Modified Files:
	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/CMFTracker/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()