(self)
| 2102 | class TestFillingValues: |
| 2103 | |
| 2104 | def test_check_on_scalar(self): |
| 2105 | # Test _check_fill_value set to valid and invalid values |
| 2106 | _check_fill_value = np.ma.core._check_fill_value |
| 2107 | |
| 2108 | fval = _check_fill_value(0, int) |
| 2109 | assert_equal(fval, 0) |
| 2110 | fval = _check_fill_value(None, int) |
| 2111 | assert_equal(fval, default_fill_value(0)) |
| 2112 | |
| 2113 | fval = _check_fill_value(0, "|S3") |
| 2114 | assert_equal(fval, b"0") |
| 2115 | fval = _check_fill_value(None, "|S3") |
| 2116 | assert_equal(fval, default_fill_value(b"camelot!")) |
| 2117 | assert_raises(TypeError, _check_fill_value, 1e+20, int) |
| 2118 | assert_raises(TypeError, _check_fill_value, 'stuff', int) |
| 2119 | |
| 2120 | def test_check_on_fields(self): |
| 2121 | # Tests _check_fill_value with records |
nothing calls this directly
no test coverage detected