Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix and enable I/O protocol tests
  • Loading branch information
srittau committed Sep 2, 2025
commit e4e8b67f1ccb75020588a0174f2864a8bf1a9d91
9 changes: 5 additions & 4 deletions Lib/test/test_io/test_general.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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
Expand Down
Loading