Skip to content

Commit e104aad

Browse files
[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 3f23888) Co-authored-by: Sebastian Rittau <[email protected]>
1 parent dd5d86c commit e104aad

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Lib/test/test_io.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5014,12 +5014,12 @@ def write(self, b: bytes):
50145014
pass
50155015

50165016
def test_reader_subclass(self):
5017-
self.assertIsSubclass(MyReader, io.Reader[bytes])
5018-
self.assertNotIsSubclass(str, io.Reader[bytes])
5017+
self.assertIsSubclass(self.MyReader, io.Reader)
5018+
self.assertNotIsSubclass(str, io.Reader)
50195019

50205020
def test_writer_subclass(self):
5021-
self.assertIsSubclass(MyWriter, io.Writer[bytes])
5022-
self.assertNotIsSubclass(str, io.Writer[bytes])
5021+
self.assertIsSubclass(self.MyWriter, io.Writer)
5022+
self.assertNotIsSubclass(str, io.Writer)
50235023

50245024

50255025
def load_tests(loader, tests, pattern):
@@ -5033,6 +5033,7 @@ def load_tests(loader, tests, pattern):
50335033
CTextIOWrapperTest, PyTextIOWrapperTest,
50345034
CMiscIOTest, PyMiscIOTest,
50355035
CSignalsTest, PySignalsTest, TestIOCTypes,
5036+
ProtocolsTest,
50365037
)
50375038

50385039
# Put the namespaces of the IO module we are testing and some useful mock

0 commit comments

Comments
 (0)