https://github.com/python/cpython/commit/3f23888fd773dd1ead2adcdd0d586eb6e831d154
commit: 3f23888fd773dd1ead2adcdd0d586eb6e831d154
branch: main
author: Sebastian Rittau <srit...@rittau.biz>
committer: JelleZijlstra <jelle.zijls...@gmail.com>
date: 2025-09-02T06:45:29-07:00
summary:

gh-127647: Fix and enable I/O protocol tests (#138369)

files:
M Lib/test/test_io/test_general.py

diff --git a/Lib/test/test_io/test_general.py b/Lib/test/test_io/test_general.py
index a56a2c0157f764..e3d7d26a7e0f9c 100644
--- a/Lib/test/test_io/test_general.py
+++ b/Lib/test/test_io/test_general.py
@@ -5029,12 +5029,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):
@@ -5048,6 +5048,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 -- python-checkins@python.org
To unsubscribe send an email to python-checkins-le...@python.org
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: arch...@mail-archive.com

Reply via email to