code: 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 check_warnings() as w:
              warnings.simplefilter("always")
              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 check_warnings() as w:
              warnings.simplefilter("always")
              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)
  
imports: import unittest
  import os
  import sys
  import tarfile
  from os.path import splitdrive
  import warnings
  from distutils.archive_util import check_archive_formats, make_tarball, make_zipfile, make_archive, ARCHIVE_FORMATS
  from distutils.spawn import find_executable, spawn
  from distutils.tests import support
  from test.test_support import check_warnings, run_unittest
label_desc: Use image node_id 6 for calling the ArchiveUtilTestCase obj's underlying member method code with example usage: obj.test_compress_deprecated() without return types