]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_sys: add a test on the file system encoding for darwin
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 11 Jun 2010 00:41:41 +0000 (00:41 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 11 Jun 2010 00:41:41 +0000 (00:41 +0000)
Lib/test/test_sys.py

index c056f9a77cce6a6bd27cc19a6a8397d725744a4f..371180422460e997634fe05ae52727ca6b8c4bf8 100644 (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: