Answer architecture round 4: 0 🔴, 0 🟡 (0 misread); loop-claude's suites sit beside their modules, and what tests share across packages lives in each package's doubles.py
CI / tests (pull_request) Successful in 3m43s
CI / tests (pull_request) Successful in 3m43s
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
"""Test doubles for the suites that read touch predictions: a plan whose items hold them."""
|
||||
from failure import Failure
|
||||
from plan_store.todo_md import plan_of
|
||||
|
||||
|
||||
def plan(*items: tuple[int, str, str, str]) -> list:
|
||||
"""A plan's items, each given as its ID, release, the IDs that block it and the bullets of its prediction, none for an item without one."""
|
||||
rows = "".join(f"| {id_} | {release} | {blocked} | | **Do {id_}.** | 1 | 1 | 1 | 1 | 1 | 1 by 1 | 10.0 |\n" for id_, release, blocked, _ in items)
|
||||
details = "".join(f"### {id_}. Do {id_}.\n\nTouches:\n\n{bullets}\n\n" for id_, _, _, bullets in items if bullets)
|
||||
found = plan_of(f"# todo\n\n## Scoring\n\n`Score = 100 * V / (2**S + 8)`\n\n`Bar = 0.1`\n\n`Next ID = 99`\n\n## Items\n\n| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |\n|---|---|---|---|---|---|---|---|---|---|---|---|\n{rows}\n## Details\n\n{details}")
|
||||
assert not isinstance(found, Failure), found
|
||||
return found.items
|
||||
@@ -15,9 +15,9 @@ from test_env import isolated_env
|
||||
from project_config.main import located
|
||||
from record_store.fakes import MemoryStore
|
||||
from plan.touches import Part
|
||||
from plan_store.todo_md import plan_of
|
||||
from touch_predictions.doubles import plan
|
||||
from project_config.settings import ProjectConfig
|
||||
from project_config.test_project_config import write_config
|
||||
from project_config.doubles import write_config
|
||||
|
||||
PYTHON = """\"\"\"Docstring.\"\"\"
|
||||
import os
|
||||
@@ -132,15 +132,6 @@ class FilePartsTest(unittest.TestCase):
|
||||
self.assertIsNone(self.names("run.sh", "echo\n", 1))
|
||||
|
||||
|
||||
def plan(*items: tuple[int, str, str, str]) -> list:
|
||||
"""A plan's items, each given as its ID, release, the IDs that block it and the bullets of its prediction, none for an item without one."""
|
||||
rows = "".join(f"| {id_} | {release} | {blocked} | | **Do {id_}.** | 1 | 1 | 1 | 1 | 1 | 1 by 1 | 10.0 |\n" for id_, release, blocked, _ in items)
|
||||
details = "".join(f"### {id_}. Do {id_}.\n\nTouches:\n\n{bullets}\n\n" for id_, _, _, bullets in items if bullets)
|
||||
found = plan_of(f"# todo\n\n## Scoring\n\n`Score = 100 * V / (2**S + 8)`\n\n`Bar = 0.1`\n\n`Next ID = 99`\n\n## Items\n\n| ID | Release | Blocked by | Exempt | Item | L | E | I | R | S | Moves | Score |\n|---|---|---|---|---|---|---|---|---|---|---|---|\n{rows}\n## Details\n\n{details}")
|
||||
assert not isinstance(found, Failure), found
|
||||
return found.items
|
||||
|
||||
|
||||
class ChunksBesideTest(unittest.TestCase):
|
||||
def test_picks_in_the_plans_order_each_item_that_overlaps_none_before_it(self) -> None:
|
||||
items = plan((1, "0.2.0", "", "- `a.py`: `f`"), (2, "0.2.0", "", "- `a.py`: `g`\n- `b.py`"), (3, "0.2.0", "", "- `b.py`: `h`"), (4, "0.2.0", "", "- `a.py`: `f`"), (5, "0.2.0", "", "- `c.py`"))
|
||||
|
||||
Reference in New Issue
Block a user