diff --git a/tests/unit/gui/test_uilabel.py b/tests/unit/gui/test_uilabel.py index f6675d306..0753ff68f 100644 --- a/tests/unit/gui/test_uilabel.py +++ b/tests/unit/gui/test_uilabel.py @@ -12,7 +12,7 @@ def test_constructor_only_text_no_size(window): label = UILabel(text="Example") assert label.rect.width == pytest.approx( - 63, abs=7 + 63, abs=10 ) # on windows the width differs about 6 pixel assert label.rect.height == pytest.approx(19, abs=1) @@ -48,21 +48,21 @@ def test_constructor_adaptive_width_support_for_multiline_text(window): def test_with_border_keeps_previous_size(window): label = UILabel(text="Example") - assert label.rect.width == pytest.approx(63, abs=7) + assert label.rect.width == pytest.approx(63, abs=10) assert label.rect.height == pytest.approx(19, abs=6) label.with_border() - assert label.rect.width == pytest.approx(63, abs=7) + assert label.rect.width == pytest.approx(63, abs=10) assert label.rect.height == pytest.approx(19, abs=6) def test_with_padding_keeps_previous_size(window): label = UILabel(text="Example") - assert label.rect.width == pytest.approx(63, abs=7) + assert label.rect.width == pytest.approx(63, abs=10) assert label.rect.height == pytest.approx(19, abs=6) label.with_padding(all=2) - assert label.rect.width == pytest.approx(63, abs=7) + assert label.rect.width == pytest.approx(63, abs=10) assert label.rect.height == pytest.approx(19, abs=6) @@ -193,7 +193,7 @@ def test_integration_with_layout_fit_to_content(ui): ui.execute_layout() # auto size should fit the text - assert label.rect.width == pytest.approx(63, abs=7) + assert label.rect.width == pytest.approx(63, abs=10) assert label.rect.height == pytest.approx(19, abs=6) # even when text changed @@ -221,7 +221,7 @@ def test_fit_content_overrides_width(ui): label.fit_content() - assert label.rect.width == pytest.approx(63, abs=7) + assert label.rect.width == pytest.approx(63, abs=10) assert label.rect.height == pytest.approx(19, abs=6)