[Python-checkins] CVS: python/dist/src/Lib/test test_descr.py,1.5,1.6
Guido van Rossum
gvanrossum@users.sourceforge.net
Fri, 10 Aug 2001 14:28:48 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv13078
Modified Files:
test_descr.py
Log Message:
Add test for SF bug #442833 (multiple inheritance).
Index: test_descr.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_descr.py,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** test_descr.py 2001/08/10 19:42:38 1.5
--- test_descr.py 2001/08/10 21:28:46 1.6
***************
*** 442,445 ****
--- 442,459 ----
verify(D.__mro__ == (D, dictionary, C, object))
+ # SF bug #442833
+ class Node(object):
+ def __int__(self):
+ return int(self.foo())
+ def foo(self):
+ return "23"
+ class Frag(Node, list):
+ def foo(self):
+ return "42"
+ verify(Node().__int__() == 23)
+ verify(int(Node()) == 23)
+ verify(Frag().__int__() == 42)
+ verify(int(Frag()) == 42)
+
def diamond():
if verbose: print "Testing multiple inheritance special cases..."