mirror of
https://github.com/python/cpython.git
synced 2025-10-13 10:23:28 +00:00
Close #11548: Correctly handle format argument in shutil.unpack_archive
This commit is contained in:
parent
a78e4e6daf
commit
abf202d798
2 changed files with 10 additions and 2 deletions
|
@ -645,6 +645,14 @@ class TestShutil(unittest.TestCase):
|
|||
diff = self._compare_dirs(tmpdir, tmpdir2)
|
||||
self.assertEqual(diff, [])
|
||||
|
||||
# and again, this time with the format specified
|
||||
tmpdir3 = self.mkdtemp()
|
||||
unpack_archive(filename, tmpdir3, format=format)
|
||||
diff = self._compare_dirs(tmpdir, tmpdir3)
|
||||
self.assertEqual(diff, [])
|
||||
self.assertRaises(shutil.ReadError, unpack_archive, TESTFN)
|
||||
self.assertRaises(ValueError, unpack_archive, TESTFN, format='xxx')
|
||||
|
||||
def test_unpack_registery(self):
|
||||
|
||||
formats = get_unpack_formats()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue