We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fedfd28 commit bbf976dCopy full SHA for bbf976d
1 file changed
Lib/test/test_capi/test_number.py
@@ -287,11 +287,7 @@ def test_float(self):
287
self.assertEqual(float_(IndexLike.with_val(-1)), -1.0)
288
289
self.assertRaises(TypeError, float_, FloatLike.with_val(687))
290
- with warnings.catch_warnings():
291
- warnings.simplefilter("error", DeprecationWarning)
292
- self.assertRaises(DeprecationWarning, float_, FloatLike.with_val(subclassof(float)(4.25)))
293
- with self.assertWarns(DeprecationWarning):
294
- self.assertEqual(float_(FloatLike.with_val(subclassof(float)(4.25))), 4.25)
+ self.assertRaises(TypeError, float_, FloatLike.with_val(subclassof(float)(4.25)))
295
self.assertRaises(RuntimeError, float_, FloatLike.with_exc(RuntimeError))
296
297
self.assertRaises(TypeError, float_, IndexLike.with_val(1.25))
0 commit comments