code: def test_finalize_options(self):
      dist, cmd = self.get_cmd()
      cmd.finalize_options()
  
      # default options set by finalize
      self.assertEqual(cmd.manifest, "MANIFEST")
      self.assertEqual(cmd.template, "MANIFEST.in")
      self.assertEqual(cmd.dist_dir, "dist")
  
      # formats has to be a string splitable on (' ', ',') or
      # a stringlist
      cmd.formats = 1
      self.assertRaises(DistutilsOptionError, cmd.finalize_options)
      cmd.formats = ["zip"]
      cmd.finalize_options()
  
      # formats has to be known
      cmd.formats = "supazipa"
      self.assertRaises(DistutilsOptionError, cmd.finalize_options)
  
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 11 for calling the SDistTestCase obj's underlying member method code with example usage: obj.test_finalize_options() without return types