def METHOD_NAME(self):
    with open("setup.py", "w") as setup_file:
        print("import bad_module", file=setup_file)
    self.assertRaises(
        _errors.SetupPyImportError, setuppy.extract, "setup.py", workdir="."
    )