Answer stability round 1: 0 🔴, 2 🟡 (0 misread); test the failed removal, run the new tests under the guard, and reword the prose round's finding
This commit is contained in:
@@ -226,10 +226,6 @@ class ClaudeReply(unittest.TestCase):
|
||||
self.assertEqual(reply.claude_reply(self.claude(FileNotFoundError(2, "No such file or directory")), [], "/r", "p", "claude"), Failure("could not start claude: No such file or directory"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
|
||||
class EmptyTranscript(unittest.TestCase):
|
||||
def setUp(self):
|
||||
temp = tempfile.TemporaryDirectory()
|
||||
@@ -253,11 +249,15 @@ class EmptyTranscript(unittest.TestCase):
|
||||
self.assertIsNone(session.discard_empty_transcript(self.session))
|
||||
self.assertEqual(self.path.read_text(), "{")
|
||||
|
||||
def test_discarding_says_where_it_could_not_remove_the_file(self):
|
||||
def test_discarding_fails_naming_the_file_it_could_not_remove(self):
|
||||
assert_not_root(self)
|
||||
self.path.touch()
|
||||
self.path.parent.chmod(0o500)
|
||||
self.addCleanup(self.path.parent.chmod, 0o700)
|
||||
failure = session.discard_empty_transcript(self.session)
|
||||
self.assertIsInstance(failure, Failure)
|
||||
self.assertEqual(failure.reason, f"could not remove the empty transcript {self.path}: Permission denied; remove it, then run it again")
|
||||
self.assertEqual(failure.reason, f"could not remove the empty transcript {self.path}: Permission denied; claude refuses to start the session while that file stands")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
||||
Reference in New Issue
Block a user