(self)
| 2273 | class TestFillingValues: |
| 2274 | |
| 2275 | def test_check_on_scalar(self): |
| 2276 | # Test _check_fill_value set to valid and invalid values |
| 2277 | _check_fill_value = np.ma.core._check_fill_value |
| 2278 | |
| 2279 | fval = _check_fill_value(0, int) |
| 2280 | assert_equal(fval, 0) |
| 2281 | fval = _check_fill_value(None, int) |
| 2282 | assert_equal(fval, default_fill_value(0)) |
| 2283 | |
| 2284 | fval = _check_fill_value(0, "|S3") |
| 2285 | assert_equal(fval, b"0") |
| 2286 | fval = _check_fill_value(None, "|S3") |
| 2287 | assert_equal(fval, default_fill_value(b"camelot!")) |
| 2288 | assert_raises(TypeError, _check_fill_value, 1e+20, int) |
| 2289 | assert_raises(TypeError, _check_fill_value, 'stuff', int) |
| 2290 | |
| 2291 | def test_fill_value_datetime_structured(self): |
| 2292 | # gh-29818 |
nothing calls this directly
no test coverage detected