diff options
author | Georg Brandl <georg@python.org> | 2010-11-20 11:25:01 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2010-11-20 11:25:01 (GMT) |
commit | 9f1c1dcde30305c4ed68b296ca96028ea7123152 (patch) | |
tree | 257660ad8845b41785a73e9642bc8ec855a794df /Lib/test/test_gzip.py | |
parent | 4ccc137affe960741c3f6758ce00277d15409665 (diff) | |
download | cpython-9f1c1dcde30305c4ed68b296ca96028ea7123152.zip cpython-9f1c1dcde30305c4ed68b296ca96028ea7123152.tar.gz cpython-9f1c1dcde30305c4ed68b296ca96028ea7123152.tar.bz2 |
#10465: fix broken delegation in __getattr__ of _PaddedFile.
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r-- | Lib/test/test_gzip.py | 6 |
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: |