Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Enable test on embedded null in errors on _io test
  • Loading branch information
vstinner committed Nov 14, 2023
commit 43b222c9757f8776c0c2f1906ade4090ec353381
4 changes: 1 addition & 3 deletions Lib/test/test_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -2725,9 +2725,7 @@ def test_constructor(self):
if support.Py_DEBUG or sys.flags.dev_mode or self.is_C:
with self.assertRaises(UnicodeEncodeError):
t.__init__(b, encoding="utf-8", errors='\udcfe')
if support.Py_DEBUG or sys.flags.dev_mode:
# TODO: If encoded to UTF-8, should also be checked for
# embedded null characters.
if support.Py_DEBUG or sys.flags.dev_mode or self.is_C:
with self.assertRaises(ValueError):
t.__init__(b, encoding="utf-8", errors='replace\0')
with self.assertRaises(TypeError):
Expand Down