Answer architecture round 1: 4 🔴, 5 🟡 (0 misread); one-way plan packages with a plan core and an Atlassian client, one parse and print of an item's cells, a pure chunk-start decision, a settings table, one plan read and one standing per pick, one config load in chunk-pr, notifier backends in notifier, and the bin regroup filed as item 392
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
import pathlib
|
||||
import sys
|
||||
import unittest
|
||||
|
||||
sys.path.insert(0, str(pathlib.Path(__file__).resolve().parents[1]))
|
||||
|
||||
from plan.named_code 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()
|
||||
Reference in New Issue
Block a user