MCPcopy Index your code
hub / github.com/RustPython/RustPython / complex2

Class complex2

Lib/test/test_complex.py:626–630  ·  view source on GitHub ↗

Make sure that __complex__() calls fail if anything other than a complex is returned

Source from the content-addressed store, hash-verified

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):

Callers 1

test_constructorMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_constructorMethod · 0.68