Answer product-owner round 1: 1 🔴, 1 🟡 (1 misread); DM through the checkout of a held-up issue's repo and show the DM in the window
This commit is contained in:
@@ -109,6 +109,8 @@ class FakeEffects:
|
||||
self.owner = owner
|
||||
# Each direct message sent. They stay out of self.calls, so a test that lists every call doesn't list them. Without a script, each is sent.
|
||||
self.dms = []
|
||||
# The directory each DM named, in the order of self.dms; None where it named none.
|
||||
self.dm_directories = []
|
||||
self.dm_failures = list(dm_failures)
|
||||
self.scripts = {"claude": list(claude), "claude_on_terminal": list(on_terminal_claude), "git": list(git), "input": list(inputs), "python": list(python), "stream_claude": list(streams)}
|
||||
# Without a script, every read finds all memory available.
|
||||
@@ -144,8 +146,9 @@ class FakeEffects:
|
||||
return subprocess.CompletedProcess(args, 1 if self.windows is None else 0, self.windows or "", "no server")
|
||||
return subprocess.CompletedProcess(args, 0, {"-V": self.tmux_version + "\n", "show-options": self.owner + "\n"}.get(args[0], "@9\n"), "")
|
||||
|
||||
def dm(self, text):
|
||||
def dm(self, text, directory):
|
||||
self.dms.append(text)
|
||||
self.dm_directories.append(directory)
|
||||
return self.dm_failures.pop(0) if self.dm_failures else None
|
||||
|
||||
def memory(self):
|
||||
@@ -832,7 +835,7 @@ class Interrupts(unittest.TestCase):
|
||||
def test_drops_the_keys_typed_before_the_question_ahead_of_the_dm_so_an_answer_typed_while_it_sends_counts(self):
|
||||
fake = FakeEffects(inputs=["Use B."])
|
||||
seen = []
|
||||
effects = dataclasses.replace(fake.effects(), dm=lambda text: seen.append(list(fake.calls)))
|
||||
effects = dataclasses.replace(fake.effects(), dm=lambda text, directory: seen.append(list(fake.calls)))
|
||||
self.assertEqual(self.put(fake, effects=effects)[0], "Use B.")
|
||||
self.assertEqual(seen, [[("discard_typed", None)]])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user