Subcommand mapping matching parent's declared subcommands should not warn.
(self, store, db_path)
| 190 | ) |
| 191 | |
| 192 | def test_valid_subcommand_mapping_ok(self, store, db_path): |
| 193 | """Subcommand mapping matching parent's declared subcommands should not warn.""" |
| 194 | mp = ParsedManpage( |
| 195 | source="ubuntu/26.04/1/git.1.gz", |
| 196 | name="git", |
| 197 | synopsis="git - version control", |
| 198 | aliases=[("git", 10)], |
| 199 | subcommands=["commit"], |
| 200 | ) |
| 201 | store.add_manpage(mp, _make_raw()) |
| 202 | store.add_manpage(_make_manpage("git-commit", "1"), _make_raw()) |
| 203 | store._conn.execute("PRAGMA foreign_keys = OFF") |
| 204 | store._conn.execute( |
| 205 | "INSERT INTO mappings(src, dst, score) VALUES (?, ?, ?)", |
| 206 | ("git commit", "ubuntu/26.04/1/git-commit.1.gz", 1), |
| 207 | ) |
| 208 | store._conn.commit() |
| 209 | store._conn.execute("PRAGMA foreign_keys = ON") |
| 210 | issues = db_check(db_path) |
| 211 | assert not any("stale subcommand mapping" in msg for _, msg in issues) |
nothing calls this directly
no test coverage detected