code: def test_prune_file_list(self):
      # this test creates a project with some VCS dirs and an NFS rename
      # file, then launches sdist to check they get pruned on all systems
  
      # creating VCS directories with some files in them
      os.mkdir(join(self.tmp_dir, "somecode", ".svn"))
      self.write_file(
          (self.tmp_dir, "somecode", ".svn", "ok.py"), "xxx"
      )
  
      os.mkdir(join(self.tmp_dir, "somecode", ".hg"))
      self.write_file((self.tmp_dir, "somecode", ".hg", "ok"), "xxx")
  
      os.mkdir(join(self.tmp_dir, "somecode", ".git"))
      self.write_file((self.tmp_dir, "somecode", ".git", "ok"), "xxx")
  
      self.write_file((self.tmp_dir, "somecode", ".nfs0001"), "xxx")
  
      # now building a sdist
      dist, cmd = self.get_cmd()
  
      # zip is available universally
      # (tar might not be installed under win32)
      cmd.formats = ["zip"]
  
      cmd.ensure_finalized()
      cmd.run()
  
      # now let's check what we have
      dist_folder = join(self.tmp_dir, "dist")
      files = os.listdir(dist_folder)
      self.assertEqual(files, ["fake-1.0.zip"])
  
      zip_file = zipfile.ZipFile(join(dist_folder, "fake-1.0.zip"))
      try:
          content = zip_file.namelist()
      finally:
          zip_file.close()
  
      # making sure everything has been pruned correctly
      expected = [
          "",
          "PKG-INFO",
          "README",
          "setup.py",
          "somecode/",
          "somecode/__init__.py",
      ]
      self.assertEqual(
          sorted(content), ["fake-1.0/" + x for x in expected]
      )
  
imports: import os
  import tarfile
  import unittest
  import warnings
  import zipfile
  from os.path import join
  from textwrap import dedent
  from test.test_support import captured_stdout, check_warnings, run_unittest
  from distutils.command.sdist import sdist, show_formats
  from distutils.core import Distribution
  from distutils.tests.test_config import PyPIRCCommandTestCase
  from distutils.errors import DistutilsOptionError
  from distutils.spawn import find_executable
  from distutils.log import WARN
  from distutils.filelist import FileList
  from distutils.archive_util import ARCHIVE_FORMATS
label_desc: Use image node_id 4 for calling the SDistTestCase obj's underlying member method code with example usage: obj.test_prune_file_list() without return types