def test_bytes_paths(self): self._clean_images() doc = Document(b"tests/resources/FAC.pdf") doc.extract_images(path=b"tests/images", prefix="img") assert os.path.exists("tests/images") assert len(glob.glob(os.path.join("tests/images", "*.png"))) == 4
def test_extract_images(self, path, no_imgs): self._clean_images() doc = Document(path) doc.extract_images(path="tests/images", prefix="img") assert os.path.exists("tests/images") assert len(glob.glob(os.path.join("tests/images", "*.png"))) == no_imgs