summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_tempfile.py
diff options
context:
space:
mode:
authorBatuhan Taşkaya <47358913+isidentical@users.noreply.github.com>2019-12-30 16:08:08 (GMT)
committerIvan Levkivskyi <levkivskyi@gmail.com>2019-12-30 16:08:08 (GMT)
commit09c482fad11c769be38b2449f1056e264b701bb7 (patch)
tree02da3aca6aa3c39e08d20b1f9417af7cb42bfed0 /Lib/test/test_tempfile.py
parent4dc5a9df59837446ec1dc5b7a0e6ce95ae5b5cec (diff)
downloadcpython-09c482fad11c769be38b2449f1056e264b701bb7.zip
cpython-09c482fad11c769be38b2449f1056e264b701bb7.tar.gz
cpython-09c482fad11c769be38b2449f1056e264b701bb7.tar.bz2
bpo-39019: Implement missing __class_getitem__ for SpooledTemporaryFile (GH-17560)
Diffstat (limited to 'Lib/test/test_tempfile.py')
-rw-r--r--Lib/test/test_tempfile.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_tempfile.py b/Lib/test/test_tempfile.py
index 232c5da..5fe9506 100644
--- a/Lib/test/test_tempfile.py
+++ b/Lib/test/test_tempfile.py
@@ -1229,6 +1229,9 @@ class TestSpooledTemporaryFile(BaseTestCase):
self.assertTrue(f._rolled)
self.assertEqual(os.fstat(f.fileno()).st_size, 20)
+ def test_class_getitem(self):
+ self.assertIs(tempfile.SpooledTemporaryFile[bytes],
+ tempfile.SpooledTemporaryFile)
if tempfile.NamedTemporaryFile is not tempfile.TemporaryFile: