(self, frame_or_series)
| 76 | tm.assert_equal(result, expected) |
| 77 | |
| 78 | def test_get_numeric_data(self, frame_or_series): |
| 79 | n = 4 |
| 80 | kwargs = { |
| 81 | frame_or_series._get_axis_name(i): list(range(n)) |
| 82 | for i in range(frame_or_series._AXIS_LEN) |
| 83 | } |
| 84 | |
| 85 | # get the numeric data |
| 86 | o = construct(frame_or_series, n, **kwargs) |
| 87 | result = o._get_numeric_data() |
| 88 | tm.assert_equal(result, o) |
| 89 | |
| 90 | # non-inclusion |
| 91 | result = o._get_bool_data() |
| 92 | expected = construct(frame_or_series, n, value="empty", **kwargs) |
| 93 | if isinstance(o, DataFrame): |
| 94 | # preserve columns dtype |
| 95 | expected.columns = o.columns[:0] |
| 96 | tm.assert_equal(result, expected) |
| 97 | |
| 98 | # get the bool data |
| 99 | arr = np.array([True, True, False, True]) |
| 100 | o = construct(frame_or_series, n, value=arr, **kwargs) |
| 101 | result = o._get_numeric_data() |
| 102 | tm.assert_equal(result, o) |
| 103 | |
| 104 | def test_get_bool_data_empty_preserve_index(self): |
| 105 | expected = Series([], dtype="bool") |
nothing calls this directly
no test coverage detected