summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-09-10 21:57:59 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-09-10 21:57:59 (GMT)
commit5b519e02016ea3a51f784dee70eead3be4ab1aff (patch)
tree5886b329aef1b3d5fe965c78b97f82f99b93f6bf /Lib/test/test_sys.py
parent6246d6dcb01c690fd82e870e5c4affbd2848d22c (diff)
downloadcpython-5b519e02016ea3a51f784dee70eead3be4ab1aff.zip
cpython-5b519e02016ea3a51f784dee70eead3be4ab1aff.tar.gz
cpython-5b519e02016ea3a51f784dee70eead3be4ab1aff.tar.bz2
Issue #9632: Remove sys.setfilesystemencoding() function: use PYTHONFSENCODING
environment variable to set the filesystem encoding at Python startup. sys.setfilesystemencoding() creates inconsistencies because it is unable to reencode all filenames in all objects.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index 8cfbaaf..639c9b0 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -630,17 +630,6 @@ class SysModuleTest(unittest.TestCase):
env['PYTHONFSENCODING'] = encoding
self.check_fsencoding(get_fsencoding(env), encoding)
- def test_setfilesystemencoding(self):
- old = sys.getfilesystemencoding()
- try:
- sys.setfilesystemencoding("iso-8859-1")
- self.assertEqual(sys.getfilesystemencoding(), "iso-8859-1")
- finally:
- sys.setfilesystemencoding(old)
- try:
- self.assertRaises(LookupError, sys.setfilesystemencoding, "xxx")
- finally:
- sys.setfilesystemencoding(old)
class SizeofTest(unittest.TestCase):