mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
Enable some unittests on FreeBSD.
test__locale: add typical POSIX-style full locale names. test_locale: use en_US.US-ASCII on FreeBSD.
This commit is contained in:
parent
302e550403
commit
8d2e08dcdf
2 changed files with 7 additions and 3 deletions
|
@ -6,9 +6,12 @@ if sys.platform == 'darwin':
|
|||
raise TestSkipped("Locale support on MacOSX is minimal and cannot be tested")
|
||||
oldlocale = locale.setlocale(locale.LC_NUMERIC)
|
||||
|
||||
tloc = "en_US"
|
||||
if sys.platform[:3] == "win":
|
||||
if sys.platform.startswith("win"):
|
||||
tloc = "en"
|
||||
elif sys.platform.startswith("freebsd"):
|
||||
tloc = "en_US.US-ASCII"
|
||||
else:
|
||||
tloc = "en_US"
|
||||
|
||||
try:
|
||||
locale.setlocale(locale.LC_NUMERIC, tloc)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue