code: def test_run_setup_uses_current_dir(self):
      # This tests that the setup script is run with the current directory
      # as its own current directory; this was temporarily broken by a
      # previous patch when TESTFN did not use the current directory.
      sys.stdout = StringIO.StringIO()
      cwd = os.getcwd()
  
      # Create a directory and write the setup.py file there:
      os.mkdir(test.test_support.TESTFN)
      setup_py = os.path.join(test.test_support.TESTFN, "setup.py")
      distutils.core.run_setup(
          self.write_setup(setup_prints_cwd, path=setup_py)
      )
  
      output = sys.stdout.getvalue()
      if output.endswith("\n"):
          output = output[:-1]
      self.assertEqual(cwd, output)
  
imports: import StringIO
  import distutils.core
  import os
  import shutil
  import sys
  import test.test_support
  from test.test_support import captured_stdout, run_unittest
  import unittest
  from distutils.tests import support
  from distutils import log
label_desc: Use image node_id 6 for calling the CoreTestCase obj's underlying member method code with example usage: obj.test_run_setup_uses_current_dir() without return types