Answer principles round 1: 0 🔴, 4 🟡; one class per standing, cases in the table, test chunk_start's open session and the earlier-release case
This commit is contained in:
@@ -960,6 +960,19 @@ class ChunkFacts(unittest.TestCase):
|
||||
self.assertIn("yourself", said)
|
||||
self.assertIn(why, said)
|
||||
|
||||
def test_runs_the_preflight_only_where_the_session_is_not_open(self):
|
||||
with tempfile.TemporaryDirectory() as home:
|
||||
opened = session.session_named("A proj loop-claude", pathlib.Path(home, "projects"))
|
||||
fresh = FakeEffects(python=[ran("- A fact.\n")])
|
||||
facts, _ = main.chunk_start(opened, self.PREFLIGHT, "/r", fresh.effects())
|
||||
self.assertEqual((fresh.made("python"), "- A fact." in facts), ([(["/b/chunk-preflight"], "/r")], True))
|
||||
transcript = pathlib.Path(home, "projects", "-fake", f"{opened.id}.jsonl")
|
||||
transcript.parent.mkdir(parents=True)
|
||||
transcript.write_text("")
|
||||
resumed = FakeEffects()
|
||||
facts, _ = main.chunk_start(opened, self.PREFLIGHT, "/r", resumed.effects())
|
||||
self.assertEqual((resumed.made("python"), facts), ([], ""))
|
||||
|
||||
|
||||
class PythonEffect(unittest.TestCase):
|
||||
def test_runs_a_script_in_the_given_directory(self):
|
||||
|
||||
Reference in New Issue
Block a user