mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
add a __dict__ descr for IOBase (closes #12878)
This commit is contained in:
parent
7335e6f3e8
commit
f6f3a35447
3 changed files with 27 additions and 0 deletions
|
@ -610,6 +610,17 @@ class IOTest(unittest.TestCase):
|
|||
self.assertEqual(rawio.read(2), None)
|
||||
self.assertEqual(rawio.read(2), b"")
|
||||
|
||||
def test_types_have_dict(self):
|
||||
test = (
|
||||
self.IOBase(),
|
||||
self.RawIOBase(),
|
||||
self.TextIOBase(),
|
||||
self.StringIO(),
|
||||
self.BytesIO()
|
||||
)
|
||||
for obj in test:
|
||||
self.assertTrue(hasattr(obj, "__dict__"))
|
||||
|
||||
class CIOTest(IOTest):
|
||||
|
||||
def test_IOBase_finalize(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue