• 3 min read
An invalid PDF should produce a useful failure
Catching a PDF parser error and logging it hid the failure from my caller. Re-raising it also meant testing where the generator is consumed.
Catching a PDF parser error and logging it hid the failure from my caller. Re-raising it also meant testing where the generator is consumed.
Real PDF and EPUB fixtures let my converter tests cross the file-reading boundary. A filename mismatch also shows why committing samples isn't proof of a passing suite.
The image extractor needed color and bit-depth information. The text extractor needed a space. Both affected the same PDF conversion output.