test that repr uses the name of the subclass and 'array' for np.ndarray
(self)
| 336 | assert_(isinstance(mxcsub_nomask[0], ComplicatedSubArray)) |
| 337 | |
| 338 | def test_subclass_repr(self): |
| 339 | """test that repr uses the name of the subclass |
| 340 | and 'array' for np.ndarray""" |
| 341 | x = np.arange(5) |
| 342 | mx = masked_array(x, mask=[True, False, True, False, False]) |
| 343 | assert_startswith(repr(mx), 'masked_array') |
| 344 | xsub = SubArray(x) |
| 345 | mxsub = masked_array(xsub, mask=[True, False, True, False, False]) |
| 346 | assert_startswith(repr(mxsub), |
| 347 | f'masked_{SubArray.__name__}(data=[--, 1, --, 3, 4]') |
| 348 | |
| 349 | def test_subclass_str(self): |
| 350 | """test str with subclass that has overridden str, setitem""" |
nothing calls this directly
no test coverage detected