| |
| import pytest |
| from transformers import pipeline |
|
|
| class TestOrcaleSeek: |
| def setup_method(self): |
| self.classifier = pipeline( |
| "text-classification", |
| model="your-username/OrcaleSeek" |
| ) |
| |
| def test_basic_prediction(self): |
| result = self.classifier("This is great!") |
| assert isinstance(result, list) |
| assert 'label' in result[0] |
| assert 'score' in result[0] |
| |
| def test_batch_prediction(self): |
| texts = ["First text", "Second text"] |
| results = self.classifier(texts) |
| assert len(results) == 2 |
| |
| def test_edge_cases(self): |
| |
| result = self.classifier("") |
| assert result is not None |
| |
| |
| long_text = "word " * 1000 |
| result = self.classifier(long_text) |
| assert result is not None |