mirror of
https://github.com/python/cpython.git
synced 2025-12-04 00:30:19 +00:00
Merged revisions 80282 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r80282 | tarek.ziade | 2010-04-20 23:09:06 +0200 (Tue, 20 Apr 2010) | 1 line removed ztar support in shutil.make_archive ........
This commit is contained in:
parent
33798fde76
commit
5e2be8737d
3 changed files with 11 additions and 61 deletions
|
|
@ -487,36 +487,6 @@ class TestShutil(unittest.TestCase):
|
|||
tarball = base_name + '.tar'
|
||||
self.assertTrue(os.path.exists(tarball))
|
||||
|
||||
@unittest.skipUnless(find_executable('compress'),
|
||||
'The compress program is required')
|
||||
def test_compress_deprecated(self):
|
||||
tmpdir, tmpdir2, base_name = self._create_files()
|
||||
|
||||
# using compress and testing the PendingDeprecationWarning
|
||||
old_dir = os.getcwd()
|
||||
os.chdir(tmpdir)
|
||||
try:
|
||||
with captured_stdout() as s, check_warnings(quiet=False) as w:
|
||||
_make_tarball(base_name, 'dist', compress='compress')
|
||||
finally:
|
||||
os.chdir(old_dir)
|
||||
tarball = base_name + '.tar.Z'
|
||||
self.assertTrue(os.path.exists(tarball))
|
||||
self.assertEqual(len(w.warnings), 1)
|
||||
|
||||
# same test with dry_run
|
||||
os.remove(tarball)
|
||||
old_dir = os.getcwd()
|
||||
os.chdir(tmpdir)
|
||||
try:
|
||||
with captured_stdout() as s, check_warnings(quiet=False) as w:
|
||||
_make_tarball(base_name, 'dist', compress='compress',
|
||||
dry_run=True)
|
||||
finally:
|
||||
os.chdir(old_dir)
|
||||
self.assertFalse(os.path.exists(tarball))
|
||||
self.assertEqual(len(w.warnings), 1)
|
||||
|
||||
@unittest.skipUnless(zlib, "Requires zlib")
|
||||
@unittest.skipUnless(ZIP_SUPPORT, 'Need zip support to run')
|
||||
def test_make_zipfile(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue