diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e91a0e69..ce1c043e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -60,7 +60,7 @@ jobs: allow-prereleases: true - name: Add locale for locale test - if: runner.os == 'Linux' + if: runner.os == 'Linux' && matrix.python-version != '3.10' run: sudo locale-gen fr_FR.UTF-8 - name: Setup uv (cached) diff --git a/tests/test_translate.py b/tests/test_translate.py index 18541b71..305cba3a 100644 --- a/tests/test_translate.py +++ b/tests/test_translate.py @@ -23,6 +23,10 @@ def french(): locale.setlocale(locale.LC_ALL, "fr_FR.utf-8") reload_cli() yield + except locale.Error: + pytest.skip( + "No fr_FR locale found, run 'sudo locale-gen fr_FR.UTF-8' to run this test" + ) finally: locale.setlocale(locale.LC_ALL, "") reload_cli()