[Python-checkins] cpython: Test the open of non-exitent tarfile in all modes.
serhiy.storchaka
python-checkins at python.org
Mon Jan 13 18:10:39 CET 2014
http://hg.python.org/cpython/rev/3a4b0e4098e6
changeset: 88439:3a4b0e4098e6
parent: 88437:bbfef8dc0e91
user: Serhiy Storchaka <storchaka at gmail.com>
date: Mon Jan 13 19:08:00 2014 +0200
summary:
Test the open of non-exitent tarfile in all modes.
files:
Lib/test/test_tarfile.py | 12 +++++++-----
1 files changed, 7 insertions(+), 5 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
@@ -234,6 +234,12 @@
finally:
tar.close()
+ def test_non_existent_tarfile(self):
+ # Test for issue11513: prevent non-existent gzipped tarfiles raising
+ # multiple exceptions.
+ with self.assertRaisesRegex(FileNotFoundError, "xxx"):
+ tarfile.open("xxx", self.mode)
+
def test_null_tarfile(self):
# Test for issue6123: Allow opening empty archives.
# This test guarantees that tarfile.open() does not treat an empty
@@ -446,11 +452,7 @@
test_fail_comp = None
class GzipMiscReadTest(GzipTest, MiscReadTestBase, unittest.TestCase):
- def test_non_existent_targz_file(self):
- # Test for issue11513: prevent non-existent gzipped tarfiles raising
- # multiple exceptions.
- with self.assertRaisesRegex(FileNotFoundError, "xxx"):
- tarfile.open("xxx", self.mode)
+ pass
class Bz2MiscReadTest(Bz2Test, MiscReadTestBase, unittest.TestCase):
def test_no_name_argument(self):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list