Skip to content

Debloat any Android or Google TV over Wi-Fi and get an Apple TV-style home.

docs: the no-list notes section is a claim, so the link moves into the row

xbsheng95053a50f197
diff --git a/docs/workflows/docs-notes.md b/docs/workflows/docs-notes.md
index a97b7a8ea..aa089cb52 100644
--- a/docs/workflows/docs-notes.md
+++ b/docs/workflows/docs-notes.md
@@ -11,7 +11,9 @@
- A note in `docs/devices/` is linked from a page a reader comes through: the row for its folder in
`examples/README.md` when the model has a list of its own, and the "Notes for models that have no tested list
yet" section of that page when it has not. `tests/test_device_notes_index.py` fails on a note nothing links,
- which is how three of them were found sitting unread.
+ which is how three of them were found sitting unread. That section is a claim as well: an entry filed there
+ says its model has no list, so once the list lands the link moves into the row, where
+ `index_notes_with_their_own_list` wants it.
- Several tests pin facts in `docs/devices/` notes, `PROMPT.md` and `docs/TROUBLESHOOTING.md` (the
`tests/test_*_note.py` files). If you reword one of those passages, run the suite and keep the fact.
- Docs and the README stay in step: a new list gets its `tv.json` (the TV tables are generated from it), and a
diff --git a/tests/test_docs_notes_recipe_index.py b/tests/test_docs_notes_recipe_index.py
index 0e83f4d07..10a462040 100644
--- a/tests/test_docs_notes_recipe_index.py
+++ b/tests/test_docs_notes_recipe_index.py
@@ -28,6 +28,7 @@ sys.path.insert(0, str(Path(__file__).resolve().parent))
from test_device_notes_index import ( # noqa: E402
NOTE_INDEX_HEADING,
index_notes,
+ index_notes_with_their_own_list,
unlinked_notes,
)
@@ -130,6 +131,21 @@ class TheCheckerStillBitesTest(unittest.TestCase):
self.assertEqual(unlinked_notes(root), [])
self.assertEqual(index_notes(root), [], "a link outside the section is not an index entry")
+ def test_an_index_entry_that_holds_its_own_list_is_reported(self):
+ # The page's second half: the section says its model has no list, so an entry that links
+ # examples/<its own folder>/debloat.txt from there belongs in that folder's row instead - which
+ # index_notes_with_their_own_list is the check for, and it is why the bullet names the move.
+ root = self.note_tree("- [A note](../docs/devices/lonely.md), Android 9: a one-day list.")
+ (root / "docs" / "devices" / "lonely.md").write_text(
+ "# A device note\n\nA tested package list for this unit lives in "
+ "[`examples/lonely/debloat.txt`](../../examples/lonely/debloat.txt).\n", encoding="utf-8")
+ (root / "examples" / "lonely").mkdir()
+ (root / "examples" / "lonely" / "debloat.txt").write_text("# a list\n", encoding="utf-8")
+ self.assertEqual(unlinked_notes(root), [], "the index entry keeps it reachable")
+ offenders = index_notes_with_their_own_list(root)
+ self.assertEqual(1, len(offenders))
+ self.assertIn("examples/lonely/debloat.txt", offenders[0])
+
class TheBulletReaderTest(unittest.TestCase):
def test_a_wrapped_bullet_is_one_bullet(self):