diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2017-02-09 16:09:03 +0100 |
commit | 2a1d833d5da7fa7a01a2eef183b0a208ed019427 (patch) | |
tree | 8da3ebb695ae55c69d0a58691403fb13d96a9476 /Lib/test/test_tarfile.py | |
parent | c6180bb73c8c7c7f9d8ea9816487b710597b6fc1 (diff) | |
parent | bbd3587a29510bd5a318e0a19fc8570c0cd3b622 (diff) | |
download | cpython-2a1d833d5da7fa7a01a2eef183b0a208ed019427.tar.gz |
Merge issue #26355 fix from 3.6
Diffstat (limited to 'Lib/test/test_tarfile.py')
-rw-r--r-- | Lib/test/test_tarfile.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index 619cbc03b2..3c51c04c58 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -1145,33 +1145,6 @@ class WriteTest(WriteTestBase, unittest.TestCase): finally: tar.close() - def test_exclude(self): - tempdir = os.path.join(TEMPDIR, "exclude") - os.mkdir(tempdir) - try: - for name in ("foo", "bar", "baz"): - name = os.path.join(tempdir, name) - support.create_empty_file(name) - - exclude = os.path.isfile - - tar = tarfile.open(tmpname, self.mode, encoding="iso8859-1") - try: - with support.check_warnings(("use the filter argument", - DeprecationWarning)): - tar.add(tempdir, arcname="empty_dir", exclude=exclude) - finally: - tar.close() - - tar = tarfile.open(tmpname, "r") - try: - self.assertEqual(len(tar.getmembers()), 1) - self.assertEqual(tar.getnames()[0], "empty_dir") - finally: - tar.close() - finally: - support.rmtree(tempdir) - def test_filter(self): tempdir = os.path.join(TEMPDIR, "filter") os.mkdir(tempdir) |