summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-10-03 16:09:28 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-10-03 16:09:28 (GMT)
commit04dc25c53728f5c2fe66d9e66af67da0c9b8959d (patch)
tree89a6a5bfc7567d3f5deba78bd96fedd2e167e2ce /Lib/test/test_sys.py
parentefb14a8857c57e446477ecb964b301b041527c50 (diff)
downloadcpython-04dc25c53728f5c2fe66d9e66af67da0c9b8959d.zip
cpython-04dc25c53728f5c2fe66d9e66af67da0c9b8959d.tar.gz
cpython-04dc25c53728f5c2fe66d9e66af67da0c9b8959d.tar.bz2
Issue #3187: Add sys.setfilesystemencoding.
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r--Lib/test/test_sys.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py
index b5b5077..5c1a8e9 100644
--- a/Lib/test/test_sys.py
+++ b/Lib/test/test_sys.py
@@ -658,6 +658,11 @@ class SizeofTest(unittest.TestCase):
# sys.flags
check(sys.flags, size(vh) + self.P * len(sys.flags))
+ def test_setfilesystemencoding(self):
+ old = sys.getfilesystemencoding()
+ sys.setfilesystemencoding("iso-8859-1")
+ self.assertEqual(sys.getfilesystemencoding(), "iso-8859-1")
+ sys.setfilesystemencoding(old)
def test_main():
test.support.run_unittest(SysModuleTest, SizeofTest)