mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
Issue #8226: sys.setfilesystemencoding() raises a LookupError if the encoding
is unknown.
This commit is contained in:
parent
cd4ec0e273
commit
120c21227a
3 changed files with 9 additions and 1 deletions
|
|
@ -799,6 +799,7 @@ class SizeofTest(unittest.TestCase):
|
|||
old = sys.getfilesystemencoding()
|
||||
sys.setfilesystemencoding("iso-8859-1")
|
||||
self.assertEqual(sys.getfilesystemencoding(), "iso-8859-1")
|
||||
self.assertRaises(LookupError, sys.setfilesystemencoding, "xxx")
|
||||
sys.setfilesystemencoding(old)
|
||||
|
||||
def test_main():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue