We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f908c74 commit 98a786dCopy full SHA for 98a786d
tests/conftest.py
@@ -7,3 +7,9 @@ def os_environ(monkeypatch):
7
mock_environ = dict(os.environ)
8
monkeypatch.setattr(os, 'environ', mock_environ)
9
return mock_environ
10
+
11
12
+def pytest_generate_tests(metafunc):
13
+ if hasattr(metafunc.function, "all_locales"):
14
+ from babel.localedata import locale_identifiers
15
+ metafunc.parametrize("locale", list(locale_identifiers()))
tests/test_locale_load.py
@@ -0,0 +1,8 @@
1
+# -*- coding: utf-8 -*-
2
+import pytest
3
+from babel import Locale
4
5
6
+@pytest.mark.all_locales
+def test_locale_load(locale):
+ assert str(Locale.parse(locale)) == locale
0 commit comments