summaryrefslogtreecommitdiffstats
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.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py
index 7f2e798..8af6d2b 100644
--- a/Lib/test/test_gzip.py
+++ b/Lib/test/test_gzip.py
@@ -197,6 +197,12 @@ class TestGzip(unittest.TestCase):
self.assertTrue(hasattr(f, "name"))
self.assertEqual(f.name, self.filename)
+ def test_paddedfile_getattr(self):
+ self.test_write()
+ with gzip.GzipFile(self.filename, 'rb') as f:
+ self.assertTrue(hasattr(f.fileobj, "name"))
+ self.assertEqual(f.fileobj.name, self.filename)
+
def test_mtime(self):
mtime = 123456789
with gzip.GzipFile(self.filename, 'w', mtime = mtime) as fWrite: