Answer prose round 1: 0 🔴, 7 🟡 (0 misread); the codec pads on a space at both ends too, and the Valid lines name the event that expires them
This commit is contained in:
@@ -135,8 +135,7 @@ class PredictedTest(unittest.TestCase):
|
||||
self.assertEqual(predicted("Touches:\n- `a.md`: `` ## The `foo` tool `` (small), ``` `` ```, `` `x` ``\n"), {"a.md": (Part("## The `foo` tool", small=True), Part("``"), Part("`x`"))})
|
||||
self.assertEqual(rendered({"a.md": (Part("## The `foo` tool", small=True), Part("``"))}), "- `a.md`: `` ## The `foo` tool `` (small), ``` `` ```")
|
||||
|
||||
def test_a_longer_run_without_the_spaces_the_text_does_not_need_reads_as_its_text(self) -> None:
|
||||
# The spelling adf_codec gives a code mark: it pads a longer run only where the text opens or ends in a backtick.
|
||||
def test_a_longer_run_without_padding_spaces_is_the_text_between_its_runs(self) -> None:
|
||||
self.assertEqual(predicted("Touches:\n- ``a`b.md``: ``## The `foo` tool`` (small), ``` `` ```, `` `x` ``\n"), {"a`b.md": (Part("## The `foo` tool", small=True), Part("``"), Part("`x`"))})
|
||||
|
||||
def test_a_longer_run_with_a_space_at_one_end_only_keeps_it(self) -> None:
|
||||
@@ -149,7 +148,7 @@ class PredictedTest(unittest.TestCase):
|
||||
self.assertEqual(predicted(convert.adf_to_markdown(description)), predicted(DETAIL))
|
||||
|
||||
@needs_docker
|
||||
def test_a_list_typed_in_jiras_editor_reads_as_the_item_it_names(self) -> None:
|
||||
def test_a_list_typed_in_jiras_editor_reads_as_its_files_and_parts(self) -> None:
|
||||
read = convert.adf_to_markdown(JIRA_TOUCHES)
|
||||
self.assertEqual(predicted(read), {
|
||||
"bin/a.py": (Part("main"), Part("Plan.branch", small=True)),
|
||||
@@ -168,7 +167,7 @@ class PredictedTest(unittest.TestCase):
|
||||
touches = {"my file.md": (Part("## todo.md: under `Touches:` in its detail"), Part("## ``a`` and `b`", small=True), Part("`"), Part("## ends in `x`"), Part(" x "), Part("lines 2-3")), "a`b.md": (), "c, d: e.md": (Part("# T"),)}
|
||||
self.assertEqual(predicted(f"Touches:\n\n{rendered(touches)}\n"), touches)
|
||||
|
||||
def test_a_longer_run_without_its_end_or_a_name_is_a_failure(self) -> None:
|
||||
def test_a_bullet_with_an_unclosed_run_a_blank_name_or_a_stray_separator_is_a_failure(self) -> None:
|
||||
for bullet in ("- `a.md`: `` ## A", "- `a.md`: `` ## A `", "- `a.md`: `` ``", "- `a.md`: ", "- `a.md`:", "- `a.md`: `f`, ", "- `a.md`: `f`,`g`", "- ``", "- `a.md` (small)", "- `a.md`: `f` (small) (small)"):
|
||||
with self.subTest(bullet):
|
||||
self.assertIsInstance(predicted(f"Touches:\n\n{bullet}\n"), Failure)
|
||||
|
||||
Reference in New Issue
Block a user