File size: 903 Bytes
f1a0c5f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# tests/test_model.py
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):
        # Test empty string
        result = self.classifier("")
        assert result is not None
        
        # Test very long string
        long_text = "word " * 1000
        result = self.classifier(long_text)
        assert result is not None