Skip to content

Commit 3f23888

Browse files
authored
gh-127647: Fix and enable I/O protocol tests (#138369)
1 parent 33f8910 commit 3f23888

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Lib/test/test_io/test_general.py

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

50315031
def test_reader_subclass(self):
5032-
self.assertIsSubclass(MyReader, io.Reader[bytes])
5033-
self.assertNotIsSubclass(str, io.Reader[bytes])
5032+
self.assertIsSubclass(self.MyReader, io.Reader)
5033+
self.assertNotIsSubclass(str, io.Reader)
50345034

50355035
def test_writer_subclass(self):
5036-
self.assertIsSubclass(MyWriter, io.Writer[bytes])
5037-
self.assertNotIsSubclass(str, io.Writer[bytes])
5036+
self.assertIsSubclass(self.MyWriter, io.Writer)
5037+
self.assertNotIsSubclass(str, io.Writer)
50385038

50395039

50405040
def load_tests(loader, tests, pattern):
@@ -5048,6 +5048,7 @@ def load_tests(loader, tests, pattern):
50485048
CTextIOWrapperTest, PyTextIOWrapperTest,
50495049
CMiscIOTest, PyMiscIOTest,
50505050
CSignalsTest, PySignalsTest, TestIOCTypes,
5051+
ProtocolsTest,
50515052
)
50525053

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

0 commit comments

Comments
 (0)