Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 59b930a

Browse files
committed
Update pytest to skip when locale unsupported
1 parent 027fac6 commit 59b930a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/matplotlib/tests/test_ticker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1449,7 +1449,6 @@ def test_latex(self, is_latex, usetex, expected):
14491449
assert fmt.format_pct(50, 100) == expected
14501450

14511451

1452-
@pytest.mark.xfail
14531452
def test_locale_comma():
14541453
currentLocale = locale.getlocale()
14551454
try:
@@ -1462,6 +1461,8 @@ def test_locale_comma():
14621461
fmt = ',$\\mathdefault{,%1.1f},$'
14631462
x = ticks._format_maybe_minus_and_locale(fmt, 0.5)
14641463
assert x == ',$\\mathdefault{,0{,}5},$'
1464+
except locale.Error:
1465+
pytest.skip("Locale fy_DE.UTF-8 is not supported on this machine")
14651466
finally:
14661467
locale.setlocale(locale.LC_ALL, currentLocale)
14671468

0 commit comments

Comments
 (0)