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

Method test_no_ending_newline

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

Source from the content-addressed store, hash-verified

1776 'b,c': ['eh']}])
1777
1778 def test_no_ending_newline(self):
1779 # No \n after last line
1780 rows = b"a,b,c\n1,2,3\n4,5,6"
1781 reader = self.open_bytes(rows)
1782 expected_schema = pa.schema([('a', pa.int64()),
1783 ('b', pa.int64()),
1784 ('c', pa.int64())])
1785 self.check_reader(reader, expected_schema,
1786 [{'a': [1, 4],
1787 'b': [2, 5],
1788 'c': [3, 6]}])
1789
1790 def test_empty_file(self):
1791 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