diff options
author | Michael W. Hudson <mwh@python.net> | 2002-11-27 10:24:44 (GMT) |
---|---|---|
committer | Michael W. Hudson <mwh@python.net> | 2002-11-27 10:24:44 (GMT) |
commit | caf17be1b7886f4c51558fb10ec8a51483102d38 (patch) | |
tree | 9297bddcaf3338451dd27e8b382ebd5a54de174d /Lib/test/test_descr.py | |
parent | e16e01fac6685e83a0121d1c6feca984fef8b946 (diff) | |
download | cpython-caf17be1b7886f4c51558fb10ec8a51483102d38.zip cpython-caf17be1b7886f4c51558fb10ec8a51483102d38.tar.gz cpython-caf17be1b7886f4c51558fb10ec8a51483102d38.tar.bz2 |
I had the inheritance cycle stuff backwards. Oops!
Diffstat (limited to 'Lib/test/test_descr.py')
-rw-r--r-- | Lib/test/test_descr.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index f77d6a4..dde165d 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -3452,6 +3452,7 @@ def mutable_bases(): pass d = D() e = E() + D.__bases__ = (C,) D.__bases__ = (C2,) vereq(d.meth(), 1) vereq(e.meth(), 1) @@ -3492,6 +3493,13 @@ def mutable_bases(): # actually, we'll have crashed by here... raise TestFailed, "shouldn't be able to create inheritance cycles" + try: + D.__bases__ = (E,) + except TypeError: + pass + else: + raise TestFailed, "shouldn't be able to create inheritance cycles" + # let's throw a classic class into the mix: class Classic: def meth2(self): |