def METHOD_NAME(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 = io.StringIO()
    cwd = os.getcwd()
    # Create a directory and write the setup.py file there:
    os.mkdir(test.support.TESTFN)
    setup_py = os.path.join(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)