Skip to content

Commit 8f37413

Browse files
committed
Moved new unit test in order to test all parser engines. Added GH issue number.
1 parent 429d829 commit 8f37413

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

pandas/io/tests/test_cparser.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,6 @@ def test_empty_field_eof(self):
359359
names=list('abcd'), engine='c')
360360
assert_frame_equal(df, c)
361361

362-
def test_chunk_begins_with_newline_whitespace(self):
363-
data = '\n hello\nworld\n'
364-
result = TextReader(StringIO(data), header=None).read()
365-
self.assertEqual(len(result[0]), 2)
366-
367362
def assert_array_dicts_equal(left, right):
368363
for k, v in compat.iteritems(left):
369364
assert(np.array_equal(v, right[k]))

pandas/io/tests/test_parsers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2287,6 +2287,12 @@ def test_single_char_leading_whitespace(self):
22872287
result = self.read_csv(StringIO(data), skipinitialspace=True)
22882288
tm.assert_frame_equal(result, expected)
22892289

2290+
def test_chunk_begins_with_newline_whitespace(self):
2291+
# GH 10022
2292+
data = '\n hello\nworld\n'
2293+
result = self.read_csv(StringIO(data), header=None)
2294+
self.assertEqual(len(result), 2)
2295+
22902296

22912297
class TestPythonParser(ParserTests, tm.TestCase):
22922298
def test_negative_skipfooter_raises(self):

0 commit comments

Comments
 (0)