MCPcopy Create free account
hub / github.com/idank/explainshell / test_unreachable_manpage

Method test_unreachable_manpage

tests/test_db_check.py:75–87  ·  view source on GitHub ↗

A manpage with no mappings should be flagged as a warning.

(self, store, db_path)

Source from the content-addressed store, hash-verified

73 assert any("orphaned mapping" in msg for msg in errors_list)
74
75 def test_unreachable_manpage(self, store, db_path):
76 """A manpage with no mappings should be flagged as a warning."""
77 store._conn.execute("PRAGMA foreign_keys = OFF")
78 store._conn.execute(
79 "INSERT INTO parsed_manpages(source, name, options, aliases) "
80 "VALUES (?, ?, '[]', '[]')",
81 ("ubuntu/26.04/1/lonely.1.gz", "lonely"),
82 )
83 store._conn.commit()
84 store._conn.execute("PRAGMA foreign_keys = ON")
85 issues = db_check(db_path)
86 warnings = [msg for sev, msg in issues if sev == "warning"]
87 assert any("unreachable manpage" in msg for msg in warnings)
88
89 def test_shadowed_duplicate(self, store, db_path):
90 """Two manpages with same name+section+distro should be flagged."""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected