import pytest from pdf_parser import PdfParser def test_pdf_parser_text_extraction(): pdf_parser = PdfParser('path_to_test_pdf') text = pdf_parser.extract_text() assert isinstance(text, str) assert len(text) > 0 def test_pdf_parser_table_extraction(): pdf_parser = PdfParser('path_to_test_pdf') tables = pdf_parser.extract_table() assert isinstance(tables, list) assert all(isinstance(table, pd.DataFrame) for table in tables)