MCPcopy Create free account
hub / github.com/apache/arrow / test_no_ending_newline

Method test_no_ending_newline

python/pyarrow/tests/test_csv.py:1777–1787  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1775 'b,c': ['eh']}])
1776
1777 def test_no_ending_newline(self):
1778 # No \n after last line
1779 rows = b"a,b,c\n1,2,3\n4,5,6"
1780 reader = self.open_bytes(rows)
1781 expected_schema = pa.schema([('a', pa.int64()),
1782 ('b', pa.int64()),
1783 ('c', pa.int64())])
1784 self.check_reader(reader, expected_schema,
1785 [{'a': [1, 4],
1786 'b': [2, 5],
1787 'c': [3, 6]}])
1788
1789 def test_empty_file(self):
1790 with pytest.raises(ValueError, match="Empty CSV file"):

Callers

nothing calls this directly

Calls 3

open_bytesMethod · 0.95
check_readerMethod · 0.95
schemaMethod · 0.45

Tested by

no test coverage detected