| 160 | assert not s.closed |
| 161 | |
| 162 | def test_iterator(self): |
| 163 | with pd.read_csv(StringIO(self.data1), chunksize=1) as reader: |
| 164 | result = pd.concat(reader, ignore_index=True) |
| 165 | expected = pd.read_csv(StringIO(self.data1)) |
| 166 | tm.assert_frame_equal(result, expected) |
| 167 | |
| 168 | # GH12153 |
| 169 | with pd.read_csv(StringIO(self.data1), chunksize=1) as it: |
| 170 | first = next(it) |
| 171 | tm.assert_frame_equal(first, expected.iloc[[0]]) |
| 172 | tm.assert_frame_equal(pd.concat(it), expected.iloc[1:]) |
| 173 | |
| 174 | @pytest.mark.skipif(WASM, reason="limited file system access on WASM") |
| 175 | @pytest.mark.parametrize( |