diff options
author | Lars Gustäbel <lars@gustaebel.de> | 2007-02-13 16:09:24 +0000 |
---|---|---|
committer | Lars Gustäbel <lars@gustaebel.de> | 2007-02-13 16:09:24 +0000 |
commit | 5b1a7857023d15a2f51467c765bade1d6f349c5e (patch) | |
tree | 49ddffe1b8cb6fa0ab0386234a996869bc487ae1 /Lib/test/test_gzip.py | |
parent | b1cc1d407b2eed5063a4c384411416cd7e302081 (diff) | |
download | cpython-git-5b1a7857023d15a2f51467c765bade1d6f349c5e.tar.gz |
Patch #1647484: Renamed GzipFile's filename attribute to name. The
filename attribute is still accessible as a property that emits a
DeprecationWarning.
Diffstat (limited to 'Lib/test/test_gzip.py')
-rw-r--r-- | Lib/test/test_gzip.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_gzip.py b/Lib/test/test_gzip.py index fbdbc304a1..124a4692b1 100644 --- a/Lib/test/test_gzip.py +++ b/Lib/test/test_gzip.py @@ -153,6 +153,13 @@ class TestGzip(unittest.TestCase): self.assertEqual(f.myfileobj.mode, 'rb') f.close() + def test_1647484(self): + for mode in ('wb', 'rb'): + f = gzip.GzipFile(self.filename, mode) + self.assert_(hasattr(f, "name")) + self.assertEqual(f.name, self.filename) + f.close() + def test_main(verbose=None): test_support.run_unittest(TestGzip) |