summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_io.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 1129484..2c502ab 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -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):