python-poppler
python-poppler copied to clipboard
Implement a test for poppler.enable_logging().
Follow up for https://github.com/cbrunet/python-poppler/pull/61, issue https://github.com/cbrunet/python-poppler/issues/49.
- add a file error_log.pdf which produces an error when text is read or an image is rendered
- add a fixture document_with_error() opening that file
- add a test test_document_with_error() which captures the stderr on the file descriptor and tests that the error message is produced only if the last invocation was not False