From 63f894e6d1881616e0f13b7a40ddcb30b772eba8 Mon Sep 17 00:00:00 2001 From: Thiago Perrotta Date: Tue, 13 Jun 2023 13:55:03 +0200 Subject: [PATCH] compare to floor and to round instead of a range --- webdriver/tests/support/fixtures_bidi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/webdriver/tests/support/fixtures_bidi.py b/webdriver/tests/support/fixtures_bidi.py index 3320f7d99a601e..c83e948d27635f 100644 --- a/webdriver/tests/support/fixtures_bidi.py +++ b/webdriver/tests/support/fixtures_bidi.py @@ -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