Skip to content

Conversation

@NadChern
Copy link
Owner

Summary

Added comprehensive unit tests for the PDF converter module to improve test coverage and ensure reliability.

What I Did

  • Created a new test file tests/test_pdf_converter.py with 12 test cases
  • Tests cover the PdfConverter class methods and module constants
  • All tests validate correct behavior for PDF file detection and conversion

Test Coverage

  • 9 tests for accepts() method - verifying PDF file recognition by extension and MIME type
  • 1 test for convert() method - testing error handling when dependencies are missing
  • 2 tests for module constants - validating accepted file extensions and MIME types

Results

12 tests written, 12 tests passed

To run all tests follow the command: pytest tests/test_pdf_converter.py -v

Screenshort of tests

Screenshot 2025-10-20 at 6 17 56 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants