MCPcopy
hub / github.com/maziyarpanahi/openmed / test_to_csv_rows

Method test_to_csv_rows

tests/unit/test_processing.py:301–311  ·  view source on GitHub ↗

Test CSV rows generation.

(self, test_helpers, sample_predictions, sample_text)

Source from the content-addressed store, hash-verified

299 assert "test-model" in html_output
300
301 def test_to_csv_rows(self, test_helpers, sample_predictions, sample_text):
302 """Test CSV rows generation."""
303 formatter = OutputFormatter()
304 result = test_helpers.create_prediction_result(sample_text, sample_predictions)
305 csv_rows = formatter.to_csv_rows(result)
306
307 assert isinstance(csv_rows, list)
308 assert len(csv_rows) == len(sample_predictions)
309 assert all(isinstance(row, dict) for row in csv_rows)
310 assert "text" in csv_rows[0]
311 assert "label" in csv_rows[0]
312
313 def test_sentencepiece_offsets_are_trimmed(self):
314 """Leading whitespace from SentencePiece offsets should be removed."""

Callers

nothing calls this directly

Calls 3

to_csv_rowsMethod · 0.95
OutputFormatterClass · 0.90

Tested by

no test coverage detected