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

Method test_conversion_from_pathlib_path_using_dir

tests.py:1278–1292  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1276 @profile
1277 @unittest.skipIf(not POPPLER_INSTALLED, "Poppler is not installed!")
1278 def test_conversion_from_pathlib_path_using_dir(self):
1279 start_time = time.time()
1280 with TemporaryDirectory() as path:
1281 images_from_path = convert_from_path(
1282 pathlib.Path("./tests/test.pdf"),
1283 output_folder=pathlib.Path(path),
1284 poppler_path=get_poppler_path(),
1285 )
1286 self.assertTrue(len(images_from_path) == 1)
1287 [im.close() for im in images_from_path]
1288 print(
1289 "test_conversion_from_pathlib_path_using_dir: {} sec".format(
1290 time.time() - start_time
1291 )
1292 )
1293
1294 @profile
1295 @unittest.skipIf(not POPPLER_INSTALLED, "Poppler is not installed!")

Callers

nothing calls this directly

Calls 2

convert_from_pathFunction · 0.90
get_poppler_pathFunction · 0.85

Tested by

no test coverage detected