Skip to content

Commit

Permalink
Enable locale tests for all platforms
Browse files Browse the repository at this point in the history
  • Loading branch information
MattHag committed Jan 10, 2025
1 parent 52c67c9 commit 45353f6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tests/solaar/ui/test_i18n.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import locale
import os
import platform

import pytest

Expand All @@ -17,7 +16,6 @@ def set_locale_de():
i18n.set_locale_to_system_default()


@pytest.mark.skipif(platform.system() == "Linux", reason="Adapt test for Linux")
def test_set_locale_to_system_default(set_locale_de):
os.environ["LC_ALL"] = "de_DE.UTF-8"
i18n.set_locale_to_system_default()
Expand All @@ -26,3 +24,12 @@ def test_set_locale_to_system_default(set_locale_de):

assert language == "de_DE"
assert encoding == "UTF-8"


def test_locale():
os.environ["LC_TIME"] = "en_SE.UTF-8"

language, encoding = locale.getlocale()

assert language == "en_SE"
assert encoding == "UTF-8"

0 comments on commit 45353f6

Please sign in to comment.