mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-26 01:46:18 +03:00
5e676ea0bd
Conflicts: Tests/bench_cffi_access.py Tests/test_file_palm.py Tests/test_format_hsv.py Tests/test_image_putdata.py Tests/test_locale.py Tests/test_mode_i16.py
40 lines
770 B
Python
40 lines
770 B
Python
from helper import unittest, PillowTestCase
|
|
|
|
from PIL import Image
|
|
|
|
import locale
|
|
|
|
# ref https://github.com/python-pillow/Pillow/issues/272
|
|
# on windows, in polish locale:
|
|
|
|
# import locale
|
|
# print locale.setlocale(locale.LC_ALL, 'polish')
|
|
# import string
|
|
# print len(string.whitespace)
|
|
# print ord(string.whitespace[6])
|
|
|
|
# Polish_Poland.1250
|
|
# 7
|
|
# 160
|
|
|
|
# one of string.whitespace is not freely convertable into ascii.
|
|
|
|
path = "Tests/images/hopper.jpg"
|
|
|
|
|
|
class TestLocale(PillowTestCase):
|
|
|
|
def test_sanity(self):
|
|
Image.open(path)
|
|
try:
|
|
locale.setlocale(locale.LC_ALL, "polish")
|
|
except:
|
|
unittest.skip('Polish locale not available')
|
|
Image.open(path)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|
|
|
|
# End of file
|