test_sys: add a test on the file system encoding for darwin

This commit is contained in:
Victor Stinner 2010-06-11 00:41:41 +00:00
parent 7f84ab5952
commit 1286d7f060
1 changed files with 5 additions and 0 deletions

View File

@ -863,6 +863,11 @@ class SizeofTest(unittest.TestCase):
# sys.flags
check(sys.flags, size(vh) + self.P * len(sys.flags))
def test_getfilesystemencoding(self):
fs_encoding = sys.getfilesystemencoding()
if sys.platform == 'darwin':
self.assertEqual(fs_encoding, 'utf-8')
def test_setfilesystemencoding(self):
old = sys.getfilesystemencoding()
try: