def test_sanity(self): Image.open(path) try: locale.setlocale(locale.LC_ALL, "polish") except: unittest.skip('Polish locale not available') Image.open(path)