(self)
| 115 | @profile |
| 116 | @unittest.skipIf(not POPPLER_INSTALLED, "Poppler is not installed!") |
| 117 | def test_conversion_from_bytes_using_dir(self): |
| 118 | start_time = time.time() |
| 119 | with TemporaryDirectory() as path: |
| 120 | with open("./tests/test.pdf", "rb") as pdf_file: |
| 121 | images_from_bytes = convert_from_bytes( |
| 122 | pdf_file.read(), output_folder=path |
| 123 | ) |
| 124 | self.assertTrue(len(images_from_bytes) == 1) |
| 125 | [im.close() for im in images_from_bytes] |
| 126 | print( |
| 127 | "test_conversion_from_bytes_using_dir: {} sec".format( |
| 128 | time.time() - start_time |
| 129 | ) |
| 130 | ) |
| 131 | |
| 132 | @profile |
| 133 | @unittest.skipIf(not POPPLER_INSTALLED, "Poppler is not installed!") |
nothing calls this directly
no test coverage detected