Test CSV rows generation.
(self, test_helpers, sample_predictions, sample_text)
| 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.""" |
nothing calls this directly
no test coverage detected