Strings containing an unrepresentable float overflow
(self)
| 18 | assert_almost_equal(flongdouble, 1.234) |
| 19 | |
| 20 | def test_floating_overflow(self): |
| 21 | """ Strings containing an unrepresentable float overflow """ |
| 22 | fhalf = np.half('1e10000') |
| 23 | assert_equal(fhalf, np.inf) |
| 24 | fsingle = np.single('1e10000') |
| 25 | assert_equal(fsingle, np.inf) |
| 26 | fdouble = np.double('1e10000') |
| 27 | assert_equal(fdouble, np.inf) |
| 28 | flongdouble = pytest.warns(RuntimeWarning, np.longdouble, '1e10000') |
| 29 | assert_equal(flongdouble, np.inf) |
| 30 | |
| 31 | fhalf = np.half('-1e10000') |
| 32 | assert_equal(fhalf, -np.inf) |
| 33 | fsingle = np.single('-1e10000') |
| 34 | assert_equal(fsingle, -np.inf) |
| 35 | fdouble = np.double('-1e10000') |
| 36 | assert_equal(fdouble, -np.inf) |
| 37 | flongdouble = pytest.warns(RuntimeWarning, np.longdouble, '-1e10000') |
| 38 | assert_equal(flongdouble, -np.inf) |
| 39 | |
| 40 | |
| 41 | class TestExtraArgs: |
nothing calls this directly
no test coverage detected