[Zope-Checkins] CVS: Zope/lib/python/BTrees/tests - testBTrees.py:1.14.36.2

Jeffrey P Shell jeffrey@zope.com
Wed, 8 Aug 2001 14:15:02 -0400


Update of /cvs-repository/Zope/lib/python/BTrees/tests
In directory cvs.zope.org:/tmp/cvs-serv29262

Modified Files:
      Tag: Zope-2_4-branch
	testBTrees.py 
Log Message:
Added code to make testBTrees.py friendly to newer versions of
unittest.py.  Patch suggested by Chris Withers (Collector issue 2455)


=== Zope/lib/python/BTrees/tests/testBTrees.py 1.14.36.1 => 1.14.36.2 ===
 from BTrees.IIBTree import IIBTree, IIBucket, IISet, IITreeSet
 from BTrees.OIBTree import OIBTree, OIBucket, OISet, OITreeSet
-from unittest import TestCase, TestSuite, JUnitTextTestRunner, VerboseTextTestRunner, makeSuite
+try:
+    from unittest import VerboseTextTestRunner
+    TextTestRunner = VerboseTextTestRunner
+except ImportError, NameError:
+    from unittest import TextTestRunner
+from unittest import TestCase, TestSuite, makeSuite
 
 from glob import glob
 import os
-
-TextTestRunner = VerboseTextTestRunner
 
 class Base:
     """ Tests common to all types: sets, buckets, and BTrees """