(self)
| 1106 | np.array(C()) == list(C()) |
| 1107 | |
| 1108 | def test_failed_len_sequence(self): |
| 1109 | # gh-7393 |
| 1110 | class A: |
| 1111 | def __init__(self, data): |
| 1112 | self._data = data |
| 1113 | def __getitem__(self, item): |
| 1114 | return type(self)(self._data[item]) |
| 1115 | def __len__(self): |
| 1116 | return len(self._data) |
| 1117 | |
| 1118 | # len(d) should give 3, but len(d[0]) will fail |
| 1119 | d = A([1,2,3]) |
| 1120 | assert_equal(len(np.array(d)), 3) |
| 1121 | |
| 1122 | def test_array_too_big(self): |
| 1123 | # Test that array creation succeeds for arrays addressable by intp |
nothing calls this directly
no test coverage detected