MCPcopy Create free account
hub / github.com/Belval/pdf2image / test_conversion_from_bytes_using_dir_14

Method test_conversion_from_bytes_using_dir_14

tests.py:173–186  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

171 @profile
172 @unittest.skipIf(not POPPLER_INSTALLED, "Poppler is not installed!")
173 def test_conversion_from_bytes_using_dir_14(self):
174 start_time = time.time()
175 with TemporaryDirectory() as path:
176 with open("./tests/test_14.pdf", "rb") as pdf_file:
177 images_from_bytes = convert_from_bytes(
178 pdf_file.read(), output_folder=path
179 )
180 self.assertTrue(len(images_from_bytes) == 14)
181 [im.close() for im in images_from_bytes]
182 print(
183 "test_conversion_from_bytes_using_dir_14: {} sec".format(
184 (time.time() - start_time) / 14.0
185 )
186 )
187
188 @profile
189 @unittest.skipIf(not POPPLER_INSTALLED, "Poppler is not installed!")

Callers

nothing calls this directly

Calls 1

convert_from_bytesFunction · 0.90

Tested by

no test coverage detected