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

Method test_conversion_from_bytes_using_dir

tests.py:117–130  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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!")

Callers

nothing calls this directly

Calls 1

convert_from_bytesFunction · 0.90

Tested by

no test coverage detected