diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-13 11:25:24 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-13 11:25:24 (GMT) |
commit | 4f76fb16b7e00dac91ea4089a28e06e8720e3294 (patch) | |
tree | bdce75f793f61b363952cd01355427953aa054bb /Lib/test/test_tarfile.py | |
parent | 62db0db5cb1ceadba7e47791f010582a4c577d9c (diff) | |
download | cpython-4f76fb16b7e00dac91ea4089a28e06e8720e3294.zip cpython-4f76fb16b7e00dac91ea4089a28e06e8720e3294.tar.gz cpython-4f76fb16b7e00dac91ea4089a28e06e8720e3294.tar.bz2 |
Issue #29210: Removed support of deprecated argument "exclude" in
tarfile.TarFile.add().
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 619cbc0..3c51c04 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) |