code: def test_command_packages_cmdline(self):
      from distutils.tests.test_dist import test_dist
  
      sys.argv.extend(
          [
              "--command-packages",
              "foo.bar,distutils.tests",
              "test_dist",
              "-Ssometext",
          ]
      )
      d = self.create_distribution()
      # let's actually try to load our test command:
      self.assertEqual(
          d.get_command_packages(),
          ["distutils.command", "foo.bar", "distutils.tests"],
      )
      cmd = d.get_command_obj("test_dist")
      self.assertIsInstance(cmd, test_dist)
      self.assertEqual(cmd.sample_option, "sometext")
  
imports: import os
  import StringIO
  import sys
  import unittest
  import warnings
  import textwrap
  from distutils.dist import Distribution, fix_help_options
  from distutils.cmd import Command
  import distutils.dist
  from test.test_support import TESTFN, captured_stdout, run_unittest, unlink
  from distutils.tests import support
  from distutils import log
label_desc: Use image node_id 6 for calling the DistributionTestCase obj's underlying member method code with example usage: obj.test_command_packages_cmdline() without return types