Skip to content

Commit 0ade265

Browse files
committed
Remove redundant tests.
1 parent fd0efdc commit 0ade265

3 files changed

Lines changed: 2 additions & 49 deletions

File tree

tests/test_agent.py

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1528,7 +1528,8 @@ def test_compact_empty_summary_returns_false(self):
15281528
session = RecordingSession()
15291529

15301530
def empty_chat_sync(
1531-
messages, system=None, temperature=None, max_tokens=None, reasoning_effort=None
1531+
messages, system=None, temperature=None, max_tokens=None, reasoning_effort=None,
1532+
cancel_check=None,
15321533
):
15331534
return Message(role="assistant", content=""), Usage()
15341535

@@ -1810,32 +1811,6 @@ def test_sync_tools_execute_in_call_order(self):
18101811
self.assertEqual(by_id["2"], "result of Bash")
18111812
self.assertEqual(by_id["3"], "result of Grep")
18121813

1813-
def test_every_sync_call_runs_one_by_one(self):
1814-
"""Sync rounds are sequential by default: EVERY call still
1815-
executes (nothing is dropped), peak concurrency stays 1, the
1816-
round takes ~the sum of the durations, and results still
1817-
arrive in original order."""
1818-
session = ParallelToolSession(duration=0.15)
1819-
session.tools_enabled = False
1820-
calls = [
1821-
ToolCall(id=str(i), name="Read", arguments='{"file_path": "/tmp/x.py"}')
1822-
for i in range(1, 4)
1823-
]
1824-
session.client.script = [("", calls), "done"]
1825-
loop = AgentLoop(session, messages=[Message(role="user", content="go")])
1826-
start = time.monotonic()
1827-
result = loop.run()
1828-
elapsed = time.monotonic() - start
1829-
self.assertEqual(result, "done")
1830-
self.assertEqual(session.executed_count, 3)
1831-
self.assertEqual(session.max_active, 1)
1832-
# ~3 x 0.15s serialized, not a single 0.15s batch
1833-
self.assertGreaterEqual(elapsed, 0.4)
1834-
self.assertEqual(
1835-
[m.tool_call_id for m in loop.messages if m.role == "tool"],
1836-
["1", "2", "3"],
1837-
)
1838-
18391814
def test_cancel_during_delivery_discards_partial_round(self):
18401815
"""Ctrl-C landing while results are being DELIVERED (after all
18411816
tools already ran) must stop the delivery loop: the tools'

tests/test_invariants.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -368,14 +368,6 @@ class TestFSMStructuralInvariants(unittest.TestCase):
368368
entry, so the machine can never route out of a terminal state;
369369
the driver stops at the first terminal state."""
370370

371-
def test_terminal_states_have_no_outgoing_transitions(self):
372-
"""DONE/ERRS/ABRT are sinks: the table has no entry for them,
373-
so the machine can never route out of a terminal state. (They
374-
may be transition TARGETS — WAIT routes to ERRS on API error —
375-
but never sources.)"""
376-
for state in AgentLoop.TERMINAL:
377-
self.assertNotIn(state, AgentLoop.TRANSITIONS)
378-
379371
def test_every_non_terminal_state_has_transitions_with_true_default(self):
380372
for state in set(AgentLoop.HANDLERS) - AgentLoop.TERMINAL:
381373
table = AgentLoop.TRANSITIONS.get(state)

tests/test_tools_misc.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -160,10 +160,6 @@ def test_invalid_questions_returns_error(self):
160160
result = Question().run({"questions": "nope"}, ToolContext())
161161
self.assertEqual(result, "Error: questions must be an array")
162162

163-
def test_missing_questions_returns_error(self):
164-
result = Question().run({}, ToolContext())
165-
self.assertEqual(result, "Error: questions must be an array")
166-
167163
def test_ask_questions_exception_contained(self):
168164
def boom(qs):
169165
raise RuntimeError("ui broke")
@@ -219,16 +215,6 @@ def test_skill_found_reads_file(self):
219215
out = Skill().run({"skill": "my-skill"}, ToolContext(sess))
220216
self.assertEqual(out, "[Skill: my-skill]\n\ninstructions")
221217

222-
def test_skill_found_without_session_args(self):
223-
with tempfile.TemporaryDirectory() as d:
224-
p = os.path.join(d, "skill.md")
225-
with open(p, "w") as f:
226-
f.write("x")
227-
sess = FakeSession()
228-
sess.find_skill = lambda name: p
229-
out = Skill().run({}, ToolContext(sess))
230-
self.assertEqual(out, "[Skill: ]\n\nx")
231-
232218

233219
class TestTodoWriteTool(unittest.TestCase):
234220
"""TodoWrite updates the session and returns the JSON payload."""

0 commit comments

Comments
 (0)