Skip to content

Commit

Permalink
generate with locale
Browse files Browse the repository at this point in the history
  • Loading branch information
JanCaha committed Nov 10, 2024
1 parent 853bab0 commit 16d00b1
Show file tree
Hide file tree
Showing 7 changed files with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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()
Expand Down
Binary file modified tests/images/correct/legend_with_all.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/images/correct/legend_with_all_rotated.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/images/correct/legend_with_values_ticks.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/images/correct/legend_with_values_ticks_midpoints.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/images/correct/widget_layout_item.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified tests/images/correct/widget_renderer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 16d00b1

Please sign in to comment.