def METHOD_NAME(self):
    with open("setup.py", "w") as setup_file:
        print(
            dedent(
                """\
            def setup(**kwargs):
                # Raise what setuptools and distutils raise
                raise SystemExit()
            setup(name='name', version='version')
            """
            ),
            file=setup_file,
        )
    self.assertRaises(
        _errors.SetupPyFileParseError, setuppy.extract, "setup.py", workdir="."
    )