[Python-checkins] cpython (2.7): Backported test for issue #20238.
serhiy.storchaka
python-checkins at python.org
Sat Jan 18 14:56:30 CET 2014
http://hg.python.org/cpython/rev/f7381f1bf1ec
changeset: 88547:f7381f1bf1ec
branch: 2.7
parent: 88542:8edb892f4d69
user: Serhiy Storchaka <storchaka at gmail.com>
date: Sat Jan 18 15:54:32 2014 +0200
summary:
Backported test for issue #20238.
files:
Lib/test/test_tarfile.py | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py
--- a/Lib/test/test_tarfile.py
+++ b/Lib/test/test_tarfile.py
@@ -657,6 +657,12 @@
tar.addfile(tarfile.TarInfo("foo"))
tar.close()
self.assertTrue(fobj.closed is False, "external fileobjs must never closed")
+ # Issue #20238: Incomplete gzip output with mode="w:gz"
+ data = fobj.getvalue()
+ del tar
+ test_support.gc_collect()
+ self.assertFalse(fobj.closed)
+ self.assertEqual(data, fobj.getvalue())
class WriteTest(WriteTestBase):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list