Answer stability round 1: 0 🔴, 14 🟡 (0 misread); tests that kill the surviving mutants, with a versioned MemoryStore and appended_to, plan/named_paths.py, TakenIn's docstring and the run-heavy rule naming LAUNCHERS; three places left to item 300
CI / tests (pull_request) Successful in 3m10s

This commit is contained in:
2026-11-16 16:53:36 +01:00
parent 79e0f755e2
commit 31da587415
19 changed files with 96 additions and 19 deletions
+35
View File
@@ -0,0 +1,35 @@
import pathlib
import sys
import unittest
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
from plan.named_paths import named_files, named_paths
class NamedPaths(unittest.TestCase):
def test_names_each_tracked_file_or_folder_a_backticked_span_names_once_with_its_files(self):
cases = (
("`src/` and `src`", ["src/app.py", "srcfoo/x.py"], [("src", 1)]),
("`src/`", ["src/app.py", "src/b.py"], [("src", 2)]),
("`src/app.py`, `gone.py` and `run`", ["src/app.py"], [("src/app.py", 1)]),
)
for text, tracked, named in cases:
with self.subTest(text=text):
self.assertEqual(named_paths(text, tracked), named)
class NamedFiles(unittest.TestCase):
def test_lists_each_tracked_file_a_span_names_by_itself_or_its_folder_once(self):
cases = (
("`src` and `src/a.py`", ["b.py", "src/a.py", "src/b.py", "srcfoo/x.py"], ["src/a.py", "src/b.py"]),
("`b.py`, `gone.py` and `run`", ["b.py", "c.py"], ["b.py"]),
("no span", ["b.py"], []),
)
for text, tracked, named in cases:
with self.subTest(text=text):
self.assertEqual(named_files(text, tracked), named)
if __name__ == "__main__":
unittest.main()