Skip to content

Commit

Permalink
Fix flaky test in translation tests
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Gaebler <[email protected]>
  • Loading branch information
dg98 committed Feb 24, 2025
1 parent 9bf45e4 commit dcb83ba
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/test_apprise_translations.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ def test_apprise_trans_windows_users_nux(mock_getlocale):
# 4105 = en_CA
windll.kernel32.GetUserDefaultUILanguage.return_value = 4105

# Store default value to not break other tests
default_language = locale.AppriseLocale._default_language

with environ('LANGUAGE', 'LC_ALL', 'LC_CTYPE', 'LANG'):
# Our default language
locale.AppriseLocale._default_language = 'zz'
Expand Down Expand Up @@ -325,6 +328,9 @@ def test_apprise_trans_windows_users_nux(mock_getlocale):

delattr(ctypes, 'windll')

# Restore default value
locale.AppriseLocale._default_language = default_language


@pytest.mark.skipif(sys.platform == "win32", reason="Unique Nux test cases")
@mock.patch('locale.getlocale')
Expand Down

0 comments on commit dcb83ba

Please sign in to comment.