Update of /cvsroot/cvs-syncmail/syncmail/tests
In directory sc8-pr-cvs1:/tmp/cvs-serv17095
Modified Files:
Tag: new-config-branch
unittest.py
Log Message:
Make some confusing logic even more confusing so this can work with
the Python 1.5.2 versions of isinstance() and issubclass().
Index: unittest.py
===================================================================
RCS file: /cvsroot/cvs-syncmail/syncmail/tests/Attic/unittest.py,v
retrieving revision 1.1.2.3
retrieving revision 1.1.2.4
diff -u -d -r1.1.2.3 -r1.1.2.4
--- unittest.py 11 Jul 2003 04:59:04 -0000 1.1.2.3
+++ unittest.py 11 Jul 2003 05:09:14 -0000 1.1.2.4
@@ -486,7 +486,11 @@
import unittest
if type(obj) == types.ModuleType:
return self.loadTestsFromModule(obj)
- elif (isinstance(obj, (type, types.ClassType)) and
+ elif (type(obj) is types.ClassType and
+ issubclass(obj, unittest.TestCase)):
+ return self.loadTestsFromTestCase(obj)
+ elif (int is type(1) and
+ isinstance(obj, type) and
issubclass(obj, unittest.TestCase)):
return self.loadTestsFromTestCase(obj)
elif type(obj) == types.UnboundMethodType:
|