summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_io.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2011-09-03 13:26:20 (GMT)
committerBenjamin Peterson <benjamin@python.org>2011-09-03 13:26:20 (GMT)
commitf6f3a3544783496301537bc5c946b58b0e5cbac8 (patch)
tree13390f4306978a1c0ae487218a031617f06d1e87 /Lib/test/test_io.py
parent7335e6f3e825243a5ec9e7886a98fb257bc0e920 (diff)
downloadcpython-f6f3a3544783496301537bc5c946b58b0e5cbac8.zip
cpython-f6f3a3544783496301537bc5c946b58b0e5cbac8.tar.gz
cpython-f6f3a3544783496301537bc5c946b58b0e5cbac8.tar.bz2
add a __dict__ descr for IOBase (closes #12878)
Diffstat (limited to 'Lib/test/test_io.py')
-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 72c9a2d..0dc9d6d 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):