https://github.com/python/cpython/commit/e104aadcafeaa7a47742a0587bf262e36b754da6
commit: e104aadcafeaa7a47742a0587bf262e36b754da6
branch: 3.14
author: Miss Islington (bot) <[email protected]>
committer: JelleZijlstra <[email protected]>
date: 2025-10-07T21:29:02-07:00
summary:

[3.14] gh-127647: Fix and enable I/O protocol tests (GH-138369) (#138376)

gh-127647: Fix and enable I/O protocol tests (GH-138369)
(cherry picked from commit 3f23888fd773dd1ead2adcdd0d586eb6e831d154)

Co-authored-by: Sebastian Rittau <[email protected]>

files:
M Lib/test/test_io.py

diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 0c921ffbc2576a..925fe7771611b5 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -5014,12 +5014,12 @@ def write(self, b: bytes):
             pass
 
     def test_reader_subclass(self):
-        self.assertIsSubclass(MyReader, io.Reader[bytes])
-        self.assertNotIsSubclass(str, io.Reader[bytes])
+        self.assertIsSubclass(self.MyReader, io.Reader)
+        self.assertNotIsSubclass(str, io.Reader)
 
     def test_writer_subclass(self):
-        self.assertIsSubclass(MyWriter, io.Writer[bytes])
-        self.assertNotIsSubclass(str, io.Writer[bytes])
+        self.assertIsSubclass(self.MyWriter, io.Writer)
+        self.assertNotIsSubclass(str, io.Writer)
 
 
 def load_tests(loader, tests, pattern):
@@ -5033,6 +5033,7 @@ def load_tests(loader, tests, pattern):
              CTextIOWrapperTest, PyTextIOWrapperTest,
              CMiscIOTest, PyMiscIOTest,
              CSignalsTest, PySignalsTest, TestIOCTypes,
+             ProtocolsTest,
              )
 
     # Put the namespaces of the IO module we are testing and some useful mock

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to