219
217
self.assertEqual(f(JustFloatOS()), f(flt_arg))
220
218
# TypeError should be raised for classes not providing
221
219
# either __complex__ or __float__, even if they provide
223
221
# currently raises AttributeError instead of a TypeError;
224
222
# this could be considered a bug.
225
223
self.assertRaises(TypeError, f, NeitherComplexNorFloat())