def METHOD_NAME(self):
    # Make sure the script can use __file__; if that's missing, the test
    # setup.py script will raise NameError.
    dist = distutils.core.run_setup(
        self.write_setup(setup_defines_subclass))
    install = dist.get_command_obj('install')
    self.assertIn('cmd', install.sub_commands)