def METHOD_NAME(self):
    # When cwd has wrong WORKSPACE, the wrapper immediately bails out.
    with open(os.path.join(self._tempdir, "WORKSPACE"), "w") as f:
        f.write('workspace(name = "foo")\n')
    argv = ["bazel", "dummy_arg"]
    with self.assertRaises(ExecDetail) as detail:
        self._do_main(argv)
    self.assertEqual(detail.exception.name, "bazel")
    self.assertSequenceEqual(detail.exception.args, argv)
    self.assertEqual(
        "Skipping drake/tools/clion/bazel_wrapper (non-drake)\n",
        self._stderr.decode("utf-8"))