Answer stability round 1: 0 🔴, 3 🟡 (0 misread); test that loop-inbox removes a killed loop's ask as it looks and that a loop leaves the ask of another that holds the session's lock

This commit is contained in:
2026-10-29 18:37:23 +01:00
parent bf78fedc54
commit 2f27e66f50
2 changed files with 18 additions and 0 deletions
+9
View File
@@ -336,6 +336,15 @@ class Waiting(unittest.TestCase):
waiting.drop_ended(folder)
self.assertEqual(asks_and_answers(folder), [])
def test_loop_inbox_removes_a_killed_loops_ask_and_answer_as_it_looks(self):
with tempfile.TemporaryDirectory() as home:
paths = paths_from(pathlib.Path(home))
ask = asked("s1", "/a")
waiting.publish(paths.waiting, ask)
waiting.send(paths.waiting, ask, Typed("Use A."))
main.run(Window("q"), contextlib.nullcontext, paths, system_effects())
self.assertEqual(asks_and_answers(paths.waiting), [])
def test_removes_only_the_asks_and_answers_whose_loop_has_ended(self):
with tempfile.TemporaryDirectory() as temp:
folder = pathlib.Path(temp)