diff --git a/tests/conftest.py b/tests/conftest.py index ba28c1c..3b73a8a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,7 +14,7 @@ QgsVectorLayer, ) from qgis.gui import QgsMapCanvas -from qgis.PyQt.QtCore import QRectF, QSize +from qgis.PyQt.QtCore import QLocale, QRectF, QSize from qgis.PyQt.QtGui import QImage, QPainter, qRgba from BivariateRenderer.colorramps.color_ramps_register import ( @@ -26,6 +26,11 @@ from BivariateRenderer.renderer.bivariate_renderer_widget import BivariateRendererWidget +@pytest.fixture(autouse=True, scope="session") +def change_locale(): + """Sets locale to English, United Kingdom for all tests to ensure consistent results.""" + QLocale.setDefault(QLocale(QLocale.Language.English, QLocale.Country.UnitedKingdom)) + @pytest.fixture def qgs_project(qgis_iface) -> QgsProject: qgis_iface.newProject() diff --git a/tests/images/correct/legend_with_all.png b/tests/images/correct/legend_with_all.png index f2a079c..411c2f3 100755 Binary files a/tests/images/correct/legend_with_all.png and b/tests/images/correct/legend_with_all.png differ diff --git a/tests/images/correct/legend_with_all_rotated.png b/tests/images/correct/legend_with_all_rotated.png index 2f204b4..718cc7b 100755 Binary files a/tests/images/correct/legend_with_all_rotated.png and b/tests/images/correct/legend_with_all_rotated.png differ diff --git a/tests/images/correct/legend_with_values_ticks.png b/tests/images/correct/legend_with_values_ticks.png index b6f67a8..02532ab 100755 Binary files a/tests/images/correct/legend_with_values_ticks.png and b/tests/images/correct/legend_with_values_ticks.png differ diff --git a/tests/images/correct/legend_with_values_ticks_midpoints.png b/tests/images/correct/legend_with_values_ticks_midpoints.png index cdce7f9..9d5e0bb 100755 Binary files a/tests/images/correct/legend_with_values_ticks_midpoints.png and b/tests/images/correct/legend_with_values_ticks_midpoints.png differ diff --git a/tests/images/correct/widget_layout_item.png b/tests/images/correct/widget_layout_item.png index 457edf7..0bbc35c 100755 Binary files a/tests/images/correct/widget_layout_item.png and b/tests/images/correct/widget_layout_item.png differ diff --git a/tests/images/correct/widget_renderer.png b/tests/images/correct/widget_renderer.png index 4d13571..7080265 100755 Binary files a/tests/images/correct/widget_renderer.png and b/tests/images/correct/widget_renderer.png differ