Skip to content

Commit

Permalink
compare to floor and to round instead of a range
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagowfx committed Jun 13, 2023
1 parent 7e65d91 commit 63f894e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webdriver/tests/support/fixtures_bidi.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,8 @@ async def assert_pdf_dimensions(pdf, expected_dimensions):
png = await render_pdf_to_png_bidi(pdf)
width, height = png_dimensions(png)

assert floor(cm_to_px(expected_dimensions["height"])) == height
assert floor(cm_to_px(expected_dimensions["width"])) == width
assert height in [floor(cm_to_px(expected_dimensions["height"])), round(cm_to_px(expected_dimensions["height"]))]
assert width in [floor(cm_to_px(expected_dimensions["width"])), round(cm_to_px(expected_dimensions["width"]))]

return assert_pdf_dimensions

Expand Down

0 comments on commit 63f894e

Please sign in to comment.