Name the transcript deletion for what it does: delete_transcript_files, not end_session

This commit is contained in:
2026-09-26 14:41:53 +02:00
parent 39b4829ef0
commit e86b15888e
3 changed files with 5 additions and 6 deletions
+3 -3
View File
@@ -174,8 +174,8 @@ class Said(unittest.TestCase):
self.assertEqual(loop.said("not a part"), "")
class EndSession(unittest.TestCase):
def test_removes_the_transcript_and_its_siblings_and_closes_the_session(self):
class DeleteTranscriptFiles(unittest.TestCase):
def test_deletes_the_transcript_and_its_siblings_so_the_session_is_gone(self):
with tempfile.TemporaryDirectory() as home, unittest.mock.patch.dict(os.environ, {"HOME": home}):
root = os.path.join(home, ".claude", "projects", "p")
os.makedirs(root)
@@ -185,7 +185,7 @@ class EndSession(unittest.TestCase):
os.makedirs(os.path.join(root, f"{SESSION_ID}.superseded-1", "tool-results"))
open(os.path.join(root, f"{SESSION_ID}.orphaned-1-ab.jsonl"), "w").write("{}\n")
self.assertTrue(loop.session_open(SESSION_ID))
loop.end_session(transcript)
loop.delete_transcript_files(transcript)
self.assertEqual(os.listdir(root), [])
self.assertFalse(loop.session_open(SESSION_ID))