Answer stability round 1: 0 🔴, 5 🟡 (1 misread); keep locks out of compress-archives, count only a search's hits, show an unfinished failing run, and test the walk and the home
This commit is contained in:
@@ -103,6 +103,16 @@ class GatherTest(unittest.TestCase):
|
||||
found = gather(self.env, self.home, lambda args, cwd, prompt: subprocess.CompletedProcess(args, 1, "", ""))
|
||||
self.assertEqual(found.reason.splitlines()[0] if isinstance(found, Failure) else found, "the gathering claude exited 1")
|
||||
|
||||
def test_a_claude_that_ends_in_an_error_keeps_the_folder(self):
|
||||
self.reply = {"type": "result", "subtype": "error_during_execution", "is_error": True, "result": "Prompt is too long"}
|
||||
found = gather(self.env, self.home, self.claude)
|
||||
self.assertEqual((found.reason.splitlines()[0] if isinstance(found, Failure) else found, self.bench.exists()), ("the gathering claude ended in an error: Prompt is too long", True))
|
||||
|
||||
def test_a_gather_with_arguments_is_refused(self):
|
||||
with contextlib.redirect_stderr(io.StringIO()) as errors:
|
||||
self.assertEqual(main.main(["gather", "--help"], self.env, claude=self.claude), 1)
|
||||
self.assertEqual((errors.getvalue().split(";")[0], self.calls), ("gather takes no arguments", []))
|
||||
|
||||
def test_git_runs_in_the_environment_given(self):
|
||||
env = {**self.env, "GIT_DIR": str(self.home / "none")}
|
||||
self.assertIsInstance(gather(env, self.home, self.claude), Failure)
|
||||
|
||||
Reference in New Issue
Block a user