Make sure that __complex__() calls fail if anything other than a complex is returned
| 624 | return self |
| 625 | |
| 626 | class complex2(complex): |
| 627 | """Make sure that __complex__() calls fail if anything other than a |
| 628 | complex is returned""" |
| 629 | def __complex__(self): |
| 630 | return None |
| 631 | |
| 632 | check(complex(complex0(1j)), 0.0, 42.0) |
| 633 | with self.assertWarns(DeprecationWarning): |
no outgoing calls