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

Method test_no_ending_newline

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

Source from the content-addressed store, hash-verified

1705 'b,c': ['eh']}])
1706
1707 def test_no_ending_newline(self):
1708 # No \n after last line
1709 rows = b"a,b,c\n1,2,3\n4,5,6"
1710 reader = self.open_bytes(rows)
1711 expected_schema = pa.schema([('a', pa.int64()),
1712 ('b', pa.int64()),
1713 ('c', pa.int64())])
1714 self.check_reader(reader, expected_schema,
1715 [{'a': [1, 4],
1716 'b': [2, 5],
1717 'c': [3, 6]}])
1718
1719 def test_empty_file(self):
1720 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