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

Method test_conversion_from_bytes_using_cropbox

tests.py:671–680  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

669 @profile
670 @unittest.skipIf(not POPPLER_INSTALLED, "Poppler is not installed!")
671 def test_conversion_from_bytes_using_cropbox(self):
672 start_time = time.time()
673 with open("./tests/test.pdf", "rb") as pdf_file:
674 images_from_bytes = convert_from_bytes(pdf_file.read(), use_cropbox=True)
675 self.assertTrue(len(images_from_bytes) == 1)
676 print(
677 "test_conversion_from_bytes_using_cropbox: {} sec".format(
678 time.time() - start_time
679 )
680 )
681
682 @profile
683 @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