Skip to content

Commit eac3bf5

Browse files
committed
pythongh-111942: Fix test_io test_constructor()
The error handler is not tested in the _io extension. It's only tested if Python is built in debug mode (Py_DEBUG) or if the Python Development Mode (-X dev) is enabled.
1 parent 0ff6368 commit eac3bf5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎Lib/test/test_io.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2722,7 +2722,7 @@ def test_constructor(self):
27222722
t.__init__(b, encoding='utf-8\0')
27232723
with self.assertRaises(invalid_type):
27242724
t.__init__(b, encoding="utf-8", errors=42)
2725-
if support.Py_DEBUG or sys.flags.dev_mode or self.is_C:
2725+
if support.Py_DEBUG or sys.flags.dev_mode:
27262726
with self.assertRaises(UnicodeEncodeError):
27272727
t.__init__(b, encoding="utf-8", errors='\udcfe')
27282728
if support.Py_DEBUG or sys.flags.dev_mode:

0 commit comments

Comments
 (0)