Skip to content

Commit

Permalink
Bumped memory limit in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Bubbu0129 committed Dec 27, 2022
1 parent c892fd2 commit be155cf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fpdf/fpdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -3553,7 +3553,7 @@ def image(
if link:
self.link(x, y, w, h, link)

return {"rendered_width": w, "rendered_height": h}
return {**info, "rendered_width": w, "rendered_height": h}

def _vector_image(
self,
Expand Down
2 changes: 1 addition & 1 deletion test/image/test_load_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def test_load_invalid_base64_data():


# ensure memory usage does not get too high - this value depends on Python version:
@memunit.assert_lt_mb(140)
@memunit.assert_lt_mb(160)
def test_share_images_cache(tmp_path):
images_cache = {}

Expand Down
2 changes: 1 addition & 1 deletion test/image/test_oversized.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

HERE = Path(__file__).resolve().parent
IMAGE_PATH = HERE / "png_images/6c853ed9dacd5716bc54eb59cec30889.png"
MAX_MEMORY_MB = 135 # memory usage depends on Python version
MAX_MEMORY_MB = 160 # memory usage depends on Python version


def test_oversized_images_warn(caplog):
Expand Down
4 changes: 2 additions & 2 deletions test/test_perfs.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
HERE = Path(__file__).resolve().parent


@pytest.mark.timeout(40)
@pytest.mark.timeout(60)
# ensure memory usage does not get too high - this value depends on Python version:
@memunit.assert_lt_mb(171)
def test_intense_image_rendering():
Expand All @@ -17,7 +17,7 @@ def test_intense_image_rendering():
for png_file_path in (HERE / "image/png_test_suite/").glob("*.png"):
if not png_file_path.name.startswith("x"):
png_file_paths.append(str(png_file_path))
# Rendering 10 thousands pages in less than 40 seconds:
# Rendering 10 thousands pages in less than 60 seconds:
pdf = FPDF()
for _ in range(10000):
pdf.add_page()
Expand Down

0 comments on commit be155cf

Please sign in to comment.