summaryrefslogtreecommitdiff
path: root/Lib/test/test_gzip.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r--Lib/test/test_gzip.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
index 446b61ab43..7b51e45aad 100644
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -592,6 +592,15 @@ class TestGzip(BaseTest):
with gzip.open(self.filename, "rb") as f:
f._buffer.raw._fp.prepend()
+ def test_issue44439(self):
+ q = array.array('Q', [1, 2, 3, 4, 5])
+ LENGTH = len(q) * q.itemsize
+
+ with gzip.GzipFile(fileobj=io.BytesIO(), mode='w') as f:
+ self.assertEqual(f.write(q), LENGTH)
+ self.assertEqual(f.tell(), LENGTH)
+
+
class TestOpen(BaseTest):
def test_binary_modes(self):
uncompressed = data1 * 50