diff options
author | Guido van Rossum <guido@python.org> | 2001-08-10 21:28:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-08-10 21:28:46 (GMT) |
commit | e45763a8e614dfea111e4a446ab592c5e2a8682c (patch) | |
tree | 73014b7d6c415ad089e349b8cb4e30ba2fbe164f /Lib | |
parent | 61cf780b6dba2f1381391a9a7d406a12d7a415da (diff) | |
download | cpython-e45763a8e614dfea111e4a446ab592c5e2a8682c.zip cpython-e45763a8e614dfea111e4a446ab592c5e2a8682c.tar.gz cpython-e45763a8e614dfea111e4a446ab592c5e2a8682c.tar.bz2 |
Add test for SF bug #442833 (multiple inheritance).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_descr.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index 9f731cd..737fce9 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -441,6 +441,20 @@ def multi(): verify(d.getstate() == 10) 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..." class A(object): |