File size: 654 Bytes
b80cddf
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""
Basic tests for PDF processor
"""
import pytest
from utils.pdf_processor import PDFProcessor

def test_pdf_processor_init():
    """Test PDF processor initialization"""
    processor = PDFProcessor()
    assert processor is not None
    assert processor.text_splitter is not None

def test_chunk_text():
    """Test text chunking"""
    processor = PDFProcessor()
    
    sample_text = "This is a test. " * 100
    chunks = processor.chunk_text(sample_text)
    
    assert len(chunks) > 0
    assert all(isinstance(chunk, str) for chunk in chunks)

# Note: Full PDF tests require actual PDF files
# Add integration tests with sample PDFs as needed