diff options
Diffstat (limited to 'Lib/test/test_winconsoleio.py')
-rw-r--r-- | Lib/test/test_winconsoleio.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/test_winconsoleio.py b/Lib/test/test_winconsoleio.py index 70a8555..72ff960 100644 --- a/Lib/test/test_winconsoleio.py +++ b/Lib/test/test_winconsoleio.py @@ -98,6 +98,16 @@ class WindowsConsoleIOTests(unittest.TestCase): self.assertIsInstance(f, ConIO) f.close() + def test_subclass_repr(self): + class TestSubclass(ConIO): + pass + + f = TestSubclass("CON") + with f: + self.assertIn(TestSubclass.__name__, repr(f)) + + self.assertIn(TestSubclass.__name__, repr(f)) + @unittest.skipIf(sys.getwindowsversion()[:2] <= (6, 1), "test does not work on Windows 7 and earlier") def test_conin_conout_names(self): |