From 3ff37b7cf6675707465f77b1eb9091cb6f13a4dd Mon Sep 17 00:00:00 2001 From: Evan Wright Date: Thu, 17 Sep 2015 15:52:06 -0400 Subject: [PATCH] TST: Verify fix for buffer overflow in read_csv with engine='c' (GH #9735) --- pandas/io/tests/test_parsers.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pandas/io/tests/test_parsers.py b/pandas/io/tests/test_parsers.py index 6b7132aea3280..c9ae2f6029530 100755 --- a/pandas/io/tests/test_parsers.py +++ b/pandas/io/tests/test_parsers.py @@ -2293,6 +2293,13 @@ def test_chunk_begins_with_newline_whitespace(self): result = self.read_csv(StringIO(data), header=None) self.assertEqual(len(result), 2) + # GH 9735 + chunk1 = 'a' * (1024 * 256 - 2) + '\na' + chunk2 = '\n a' + result = pd.read_csv(StringIO(chunk1 + chunk2), header=None) + expected = pd.DataFrame(['a' * (1024 * 256 - 2), 'a', ' a']) + tm.assert_frame_equal(result, expected) + def test_empty_with_index(self): # GH 10184 data = 'x,y'